pub struct VfkitEmitter {
pub kernel_path: Option<String>,
pub rootfs_path: Option<String>,
pub initrd_path: Option<String>,
pub darwin_aux_path: Option<String>,
pub darwin_machine_identifier_b64: Option<String>,
}Expand description
Emits a VfkitJson from a VmSpec. Resolves bridged paths lazily: a
caller who realizes the kernel/rootfs derivations separately can fill in
the resulting paths via with_kernel_path / with_rootfs_path.
Fields§
§kernel_path: Option<String>§rootfs_path: Option<String>§initrd_path: Option<String>§darwin_aux_path: Option<String>§darwin_machine_identifier_b64: Option<String>Implementations§
Source§impl VfkitEmitter
impl VfkitEmitter
pub fn new() -> Self
pub fn with_kernel_path(self, p: impl Into<String>) -> Self
pub fn with_rootfs_path(self, p: impl Into<String>) -> Self
pub fn with_initrd_path(self, p: impl Into<String>) -> Self
pub fn with_darwin_aux_path(self, p: impl Into<String>) -> Self
pub fn with_darwin_machine_identifier(self, b64: impl Into<String>) -> Self
Sourcepub fn synthesize_darwin(&self, vm: &VmSpec) -> VfkitDarwinJson
pub fn synthesize_darwin(&self, vm: &VmSpec) -> VfkitDarwinJson
Render the Darwin guest shape. Only meaningful when
vm.hypervisor == Hypervisor::VfkitDarwin and
vm.kernel == GuestKernel::DarwinIpsw { .. }.
Sourcepub fn render_darwin(&self, vm: &VmSpec) -> String
pub fn render_darwin(&self, vm: &VmSpec) -> String
Pretty-printed JSON for the Darwin guest shape.
Trait Implementations§
Source§impl Default for VfkitEmitter
impl Default for VfkitEmitter
Source§impl MultiSynthesizer for VfkitEmitter
Multi-file emission for a full defvm: writes vm.json + boot.sh
helper that drives vfkit with the right flags. Auto-selects the Linux
vs Darwin JSON shape based on vm.hypervisor.
impl MultiSynthesizer for VfkitEmitter
Multi-file emission for a full defvm: writes vm.json + boot.sh
helper that drives vfkit with the right flags. Auto-selects the Linux
vs Darwin JSON shape based on vm.hypervisor.
Auto Trait Implementations§
impl Freeze for VfkitEmitter
impl RefUnwindSafe for VfkitEmitter
impl Send for VfkitEmitter
impl Sync for VfkitEmitter
impl Unpin for VfkitEmitter
impl UnsafeUnpin for VfkitEmitter
impl UnwindSafe for VfkitEmitter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more