pub struct VmConfigBuilder { /* private fields */ }Expand description
Builder for VmConfig.
Implementations§
Source§impl VmConfigBuilder
impl VmConfigBuilder
Sourcepub const fn vcpu_count(self, count: u32) -> Self
pub const fn vcpu_count(self, count: u32) -> Self
Sets the number of vCPUs.
Sourcepub const fn memory_size(self, size: u64) -> Self
pub const fn memory_size(self, size: u64) -> Self
Sets the memory size in bytes.
Sourcepub fn kernel_path(self, path: impl Into<String>) -> Self
pub fn kernel_path(self, path: impl Into<String>) -> Self
Sets the kernel path.
Sourcepub fn kernel_cmdline(self, cmdline: impl Into<String>) -> Self
pub fn kernel_cmdline(self, cmdline: impl Into<String>) -> Self
Sets the kernel command line.
Sourcepub fn initrd_path(self, path: impl Into<String>) -> Self
pub fn initrd_path(self, path: impl Into<String>) -> Self
Sets the initrd path.
Sourcepub const fn enable_rosetta(self, enable: bool) -> Self
pub const fn enable_rosetta(self, enable: bool) -> Self
Enables Rosetta 2 translation.
Trait Implementations§
Source§impl Debug for VmConfigBuilder
impl Debug for VmConfigBuilder
Source§impl Default for VmConfigBuilder
impl Default for VmConfigBuilder
Source§fn default() -> VmConfigBuilder
fn default() -> VmConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VmConfigBuilder
impl RefUnwindSafe for VmConfigBuilder
impl Send for VmConfigBuilder
impl Sync for VmConfigBuilder
impl Unpin for VmConfigBuilder
impl UnsafeUnpin for VmConfigBuilder
impl UnwindSafe for VmConfigBuilder
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