Enum HyperlightError

Source
pub enum HyperlightError {
Show 53 variants AnyhowError(Error), BoundsCheckFailed(u64, usize), CheckedAddOverflow(u64, u64), CStringConversionError(NulError), DisallowedSyscall, Error(String), ExecutionAccessViolation(u64), ExecutionCanceledByHost(), FailedToGetValueFromParameter(), FieldIsMissingInGuestLogData(String), GuestAborted(u8, String), GuestError(ErrorCode, String), GuestExecutionHungOnHostFunctionCall(), GuestFunctionCallAlreadyInProgress(), GuestInterfaceUnsupportedType(String), GuestOffsetIsInvalid(usize), HostFunctionNotFound(String), HypervisorHandlerCommunicationFailure(), HypervisorHandlerExecutionCancelAttemptOnFinishedExecution(), HypervisorHandlerMessageReceiveTimedout(), IOError(Error), IntConversionFailure(TryFromIntError), InvalidFlatBuffer(InvalidFlatbuffer), KVMError(Error), JsonConversionFailure(Error), LockAttemptFailed(String), MemoryAccessViolation(u64, MemoryRegionFlags, MemoryRegionFlags), MemoryAllocationFailed(Option<i32>), MemoryProtectionFailed(Option<i32>), MemoryRequestTooBig(usize, usize), MetricNotFound(&'static str), MmapFailed(Option<i32>), MprotectFailed(Option<i32>), MSHVError(MshvError), NoHypervisorFound(), NoMemorySnapshot, ParameterValueConversionFailure(ParameterValue, &'static str), PEFileProcessingFailure(Error), RawPointerLessThanBaseAddress(RawPtr, u64), RefCellBorrowFailed(BorrowError), RefCellMutBorrowFailed(BorrowMutError), ReturnValueConversionFailure(ReturnValue, &'static str), StackOverflow(), SeccompFilterBackendError(BackendError), SeccompFilterError(Error), SystemTimeError(SystemTimeError), TryFromSliceError(TryFromSliceError), UnexpectedNoOfArguments(usize, usize), UnexpectedParameterValueType(ParameterValue, String), UnexpectedReturnValueType(ReturnValue, String), UTF8StringConversionFailure(FromUtf8Error), VectorCapacityIncorrect(usize, usize, i32), VmmSysError(Error),
}
Expand description

The error type for Hyperlight operations

Variants§

§

AnyhowError(Error)

Anyhow error

§

BoundsCheckFailed(u64, usize)

Memory access out of bounds

§

CheckedAddOverflow(u64, u64)

Checked Add Overflow

§

CStringConversionError(NulError)

CString conversion error

§

DisallowedSyscall

A disallowed syscall was caught

§

Error(String)

A generic error with a message

§

ExecutionAccessViolation(u64)

Execution violation

§

ExecutionCanceledByHost()

Guest execution was cancelled by the host

§

FailedToGetValueFromParameter()

Accessing the value of a flatbuffer parameter failed

§

FieldIsMissingInGuestLogData(String)

Field Name not found in decoded GuestLogData

§

GuestAborted(u8, String)

Guest aborted during outb

§

GuestError(ErrorCode, String)

Guest call resulted in error in guest

§

GuestExecutionHungOnHostFunctionCall()

An attempt to cancel guest execution failed because it is hanging on a host function call

§

GuestFunctionCallAlreadyInProgress()

Guest call already in progress

§

GuestInterfaceUnsupportedType(String)

The given type is not supported by the guest interface.

§

GuestOffsetIsInvalid(usize)

The guest offset is invalid.

§

HostFunctionNotFound(String)

A Host function was called by the guest but it was not registered.

§

HypervisorHandlerCommunicationFailure()

An attempt to communicate with or from the Hypervisor Handler thread failed (i.e., usually a failure call to .send() or .recv() on a message passing channel)

§

HypervisorHandlerExecutionCancelAttemptOnFinishedExecution()

An attempt to cancel a Hypervisor Handler execution failed. See terminate_hypervisor_handler_execution_and_reinitialise for more details.

§

HypervisorHandlerMessageReceiveTimedout()

A Receive for a Hypervisor Handler Message Timedout

§

IOError(Error)

Reading Writing or Seeking data failed.

§

IntConversionFailure(TryFromIntError)

Failed to convert to Integer

§

InvalidFlatBuffer(InvalidFlatbuffer)

The flatbuffer is invalid

§

KVMError(Error)

Error occurred in KVM Operation

§

JsonConversionFailure(Error)

Conversion of str to Json failed

§

LockAttemptFailed(String)

An attempt to get a lock from a Mutex failed.

§

MemoryAccessViolation(u64, MemoryRegionFlags, MemoryRegionFlags)

Memory Access Violation at the given address. The access type and memory region flags are provided.

§

MemoryAllocationFailed(Option<i32>)

Memory Allocation Failed.

§

MemoryProtectionFailed(Option<i32>)

Memory Protection Failed

§

MemoryRequestTooBig(usize, usize)

The memory request exceeds the maximum size allowed

§

MetricNotFound(&'static str)

Metric Not Found.

§

MmapFailed(Option<i32>)

mmap Failed.

§

MprotectFailed(Option<i32>)

mprotect Failed.

§

MSHVError(MshvError)

mshv Error Occurred

§

NoHypervisorFound()

No Hypervisor was found for Sandbox.

§

NoMemorySnapshot

Restore_state called with no valid snapshot

§

ParameterValueConversionFailure(ParameterValue, &'static str)

Failed to get value from parameter value

§

PEFileProcessingFailure(Error)

a failure occurred processing a PE file

§

RawPointerLessThanBaseAddress(RawPtr, u64)

Raw pointer is less than base address

§

RefCellBorrowFailed(BorrowError)

RefCell borrow failed

§

RefCellMutBorrowFailed(BorrowMutError)

RefCell mut borrow failed

§

ReturnValueConversionFailure(ReturnValue, &'static str)

Failed to get value from return value

§

StackOverflow()

Stack overflow detected in guest

§

SeccompFilterBackendError(BackendError)

a backend error occurred with seccomp filters

§

SeccompFilterError(Error)

an error occurred with seccomp filters

§

SystemTimeError(SystemTimeError)

SystemTimeError

§

TryFromSliceError(TryFromSliceError)

Error occurred converting a slice to an array

§

UnexpectedNoOfArguments(usize, usize)

A function was called with an incorrect number of arguments

§

UnexpectedParameterValueType(ParameterValue, String)

The parameter value type is unexpected

§

UnexpectedReturnValueType(ReturnValue, String)

The return value type is unexpected

§

UTF8StringConversionFailure(FromUtf8Error)

Slice conversion to UTF8 failed

§

VectorCapacityIncorrect(usize, usize, i32)

The capacity of the vector is incorrect

§

VmmSysError(Error)

vmm sys Error Occurred

Trait Implementations§

Source§

impl Debug for HyperlightError

Source§

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

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

impl Display for HyperlightError

Source§

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

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

impl Error for HyperlightError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&str> for HyperlightError

Source§

fn from(s: &str) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: BackendError) -> Self

Converts to this type from the input type.
Source§

impl From<BorrowError> for HyperlightError

Source§

fn from(source: BorrowError) -> Self

Converts to this type from the input type.
Source§

impl From<BorrowMutError> for HyperlightError

Source§

fn from(source: BorrowMutError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for HyperlightError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for HyperlightError

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<Infallible> for HyperlightError

Source§

fn from(_: Infallible) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidFlatbuffer> for HyperlightError

Source§

fn from(source: InvalidFlatbuffer) -> Self

Converts to this type from the input type.
Source§

impl From<MshvError> for HyperlightError

Source§

fn from(source: MshvError) -> Self

Converts to this type from the input type.
Source§

impl From<NulError> for HyperlightError

Source§

fn from(source: NulError) -> Self

Converts to this type from the input type.
Source§

impl<T> From<PoisonError<MutexGuard<'_, T>>> for HyperlightError

Source§

fn from(e: PoisonError<MutexGuard<'_, T>>) -> Self

Converts to this type from the input type.
Source§

impl From<SystemTimeError> for HyperlightError

Source§

fn from(source: SystemTimeError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromIntError> for HyperlightError

Source§

fn from(source: TryFromIntError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromSliceError> for HyperlightError

Source§

fn from(source: TryFromSliceError) -> 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more