pub enum GuestBinary {
Buffer(Vec<u8>),
FilePath(PathBuf),
}Expand description
A GuestBinary is either a buffer or the file path to some data (e.g., a guest binary).
Variants§
Implementations§
Source§impl GuestBinary
impl GuestBinary
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 Debug for GuestBinary
impl Debug for GuestBinary
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 Freeze for GuestBinary
impl RefUnwindSafe for GuestBinary
impl Send for GuestBinary
impl Sync for GuestBinary
impl Unpin for GuestBinary
impl UnsafeUnpin for GuestBinary
impl UnwindSafe for GuestBinary
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