Skip to main content

VmCreateError

Enum VmCreateError 

Source
pub enum VmCreateError {
    TooSmall {
        requested: usize,
        required: usize,
    },
    BadSize {
        requested: usize,
        unit: usize,
    },
    SyscallError {
        op: &'static str,
        err: Errno,
    },
    InvalidMapping {
        base: GuestAddress,
        size: u64,
    },
}

Variants§

§

TooSmall

the requested VM was smaller than asmlinator’s minimum allowable size.

Fields

§requested: usize
§required: usize
§

BadSize

the requested VM’s memory size was not an even number of pages.

Fields

§requested: usize
§unit: usize
§

SyscallError

one of the several syscalls in setting up a new VM failed.

this is most likely a permissions error, or /dev/kvm doesn’t exist. otherwise, something interesting happened!

this deserves better documentation, but i’m not aware of documentation for KVM ioctl failure modes.

Fields

§op: &'static str
§err: Errno
§

InvalidMapping

base and size are not valid for mapping; either because of over/underflow, or overlaps with an existing mapping.

Fields

§size: u64

Trait Implementations§

Source§

impl Debug for VmCreateError

Source§

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

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

impl From<VmError> for VmCreateError

Source§

fn from(other: VmError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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.