pub struct GuestEnvironment<'b> {
pub guest_binary: GuestBinary,
pub init_data: Option<GuestBlob<'b>>,
}Expand description
Container for a guest binary and optional initialization data.
This struct combines a guest binary (either from a file or memory buffer) with optional data that will be available to the guest during execution.
The guest binary is owned. 'b is the lifetime of the borrowed init data.
Fields§
§guest_binary: GuestBinaryThe guest binary, which can be a file path or a buffer.
init_data: Option<GuestBlob<'b>>An optional guest blob, which can be used to provide additional data to the guest.
Implementations§
Source§impl<'b> GuestEnvironment<'b>
impl<'b> GuestEnvironment<'b>
Sourcepub fn new(guest_binary: GuestBinary, init_data: Option<&'b [u8]>) -> Self
pub fn new(guest_binary: GuestBinary, init_data: Option<&'b [u8]>) -> Self
Creates a new GuestEnvironment with the given guest binary and an optional guest blob.
Trait Implementations§
Source§impl<'b> Debug for GuestEnvironment<'b>
impl<'b> Debug for GuestEnvironment<'b>
Source§impl From<GuestBinary> for GuestEnvironment<'_>
impl From<GuestBinary> for GuestEnvironment<'_>
Source§fn from(guest_binary: GuestBinary) -> Self
fn from(guest_binary: GuestBinary) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'b> Freeze for GuestEnvironment<'b>
impl<'b> RefUnwindSafe for GuestEnvironment<'b>
impl<'b> Send for GuestEnvironment<'b>
impl<'b> Sync for GuestEnvironment<'b>
impl<'b> Unpin for GuestEnvironment<'b>
impl<'b> UnsafeUnpin for GuestEnvironment<'b>
impl<'b> UnwindSafe for GuestEnvironment<'b>
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