pub enum GuestBinary<'a> {
Buffer(&'a [u8]),
FilePath(String),
}Expand description
A GuestBinary is either a buffer or the file path to some data (e.g., a guest binary).
Variants§
Implementations§
Source§impl<'a> GuestBinary<'a>
impl<'a> GuestBinary<'a>
Sourcepub fn canonicalize(&mut self) -> Result<()>
pub fn canonicalize(&mut self) -> Result<()>
If the guest binary is identified by a file, canonicalise the path
For GuestBinary::FilePath, this resolves the path to its canonical
form. For GuestBinary::Buffer, this method is a no-op.
TODO: Maybe we should make the GuestEnvironment or
GuestBinary constructors crate-private and turn this
into an invariant on one of those types.
Trait Implementations§
Source§impl<'a> Debug for GuestBinary<'a>
impl<'a> Debug for GuestBinary<'a>
Source§impl<'a> From<GuestBinary<'a>> for GuestEnvironment<'a, '_>
impl<'a> From<GuestBinary<'a>> for GuestEnvironment<'a, '_>
Source§fn from(guest_binary: GuestBinary<'a>) -> Self
fn from(guest_binary: GuestBinary<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for GuestBinary<'a>
impl<'a> RefUnwindSafe for GuestBinary<'a>
impl<'a> Send for GuestBinary<'a>
impl<'a> Sync for GuestBinary<'a>
impl<'a> Unpin for GuestBinary<'a>
impl<'a> UnsafeUnpin for GuestBinary<'a>
impl<'a> UnwindSafe for GuestBinary<'a>
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