pub struct Config {
pub(crate) extra_args: Vec<String>,
pub(crate) o_direct: bool,
pub(crate) log_level: Level,
pub(crate) log_file: Option<String>,
pub(crate) wrapper_cmd: Option<String>,
pub(crate) kernel_url: Url,
pub(crate) initrd_url: Option<Url>,
pub(crate) rootfs_url: Option<Url>,
pub(crate) rootfs_rw: bool,
pub(crate) rootfs_compressed: bool,
pub(crate) console_hardware: String,
}Expand description
Configuration to start TestVm.
Fields§
§extra_args: Vec<String>Extra arguments for the run subcommand.
o_direct: boolUse O_DIRECT for the rootfs.
log_level: LevelLog level of TestVm
log_file: Option<String>File to save crosvm log to
wrapper_cmd: Option<String>Wrapper command line for executing TestVM
kernel_url: UrlUrl to kernel image
initrd_url: Option<Url>Url to initrd image
rootfs_url: Option<Url>Url to rootfs image
rootfs_rw: boolIf rootfs image is writable
rootfs_compressed: boolIf rootfs image is zstd compressed
console_hardware: StringConsole hardware type
Implementations§
Source§impl Config
impl Config
Sourcepub fn extra_args(self, args: Vec<String>) -> Self
pub fn extra_args(self, args: Vec<String>) -> Self
Uses extra arguments for crosvm run.
Sourcepub fn disable_sandbox(self) -> Self
pub fn disable_sandbox(self) -> Self
Uses disable-sandbox argument for crosvm run.
pub fn from_env() -> Self
pub fn with_kernel(self, url: &str) -> Self
pub fn with_initrd(self, url: &str) -> Self
pub fn with_rootfs(self, url: &str) -> Self
pub fn rootfs_is_rw(self) -> Self
pub fn rootfs_is_compressed(self) -> Self
pub fn with_stdout_hardware(self, hw_type: &str) -> Self
pub fn with_vhost_user(self, device_type: &str, socket_path: &Path) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more