Enum Hypercall

Source
#[non_exhaustive]
pub enum Hypercall<'a> { Cmdsize(&'a mut CmdsizeParams), Cmdval(&'a CmdvalParams), Exit(&'a ExitParams), FileClose(&'a mut CloseParams), FileLseek(&'a mut LseekParams), FileOpen(&'a mut OpenParams), FileRead(&'a mut ReadParams), FileWrite(&'a WriteParams), FileUnlink(&'a mut UnlinkParams), SerialWriteByte(u8), SerialWriteBuffer(&'a SerialWriteBufferParams), }
Expand description

Hypervisor calls available in Uhyve with their respective parameters. See the module level documentation on how to invoke them.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Cmdsize(&'a mut CmdsizeParams)

Get the size of the argument and environment strings. Used to allocate memory for Hypercall::Cmdval.

§

Cmdval(&'a CmdvalParams)

Copy the argument and environment strings into the VM. Usually preceeeded by Hypercall::Cmdsize so that the guest can allocate the memory for this call.

§

Exit(&'a ExitParams)

Exit the VM and return a status.

§

FileClose(&'a mut CloseParams)

§

FileLseek(&'a mut LseekParams)

§

FileOpen(&'a mut OpenParams)

§

FileRead(&'a mut ReadParams)

§

FileWrite(&'a WriteParams)

§

SerialWriteByte(u8)

Write a char to the terminal.

§

SerialWriteBuffer(&'a SerialWriteBufferParams)

Write a buffer to the terminal.

Implementations§

Source§

impl Hypercall<'_>

Source

pub fn port(&self) -> u16

Get a hypercall’s port address.

Trait Implementations§

Source§

impl<'a> Debug for Hypercall<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&Hypercall<'_>> for HypercallAddress

Source§

fn from(value: &Hypercall<'_>) -> Self

Converts to this type from the input type.
Source§

impl From<Hypercall<'_>> for HypercallAddress

Source§

fn from(value: Hypercall<'_>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for Hypercall<'a>

§

impl<'a> RefUnwindSafe for Hypercall<'a>

§

impl<'a> Send for Hypercall<'a>

§

impl<'a> Sync for Hypercall<'a>

§

impl<'a> Unpin for Hypercall<'a>

§

impl<'a> !UnwindSafe for Hypercall<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.