#[repr(u8)]pub enum MemoryError {
InvalidInstance = 1,
OutOfBounds = 2,
}Expand description
Errors that can be emitted when accessing a virtualization instance’s memory.
Variants§
InvalidInstance = 1
The supplied instance_id was invalid or the instance was destroyed.
OutOfBounds = 2
The memory region specified is not accessible.
Trait Implementations§
Source§impl Debug for MemoryError
impl Debug for MemoryError
Source§impl Decode for MemoryError
impl Decode for MemoryError
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl Encode for MemoryError
impl Encode for MemoryError
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl From<MemoryError> for u8
impl From<MemoryError> for u8
Source§fn from(enum_value: MemoryError) -> Self
fn from(enum_value: MemoryError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MemoryError
impl PartialEq for MemoryError
Source§impl TryFrom<u8> for MemoryError
impl TryFrom<u8> for MemoryError
Source§type Error = TryFromPrimitiveError<MemoryError>
type Error = TryFromPrimitiveError<MemoryError>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for MemoryError
impl TryFromPrimitive for MemoryError
const NAME: &'static str = "MemoryError"
type Primitive = u8
type Error = TryFromPrimitiveError<MemoryError>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl EncodeLike for MemoryError
impl Eq for MemoryError
impl StructuralPartialEq for MemoryError
Auto Trait Implementations§
impl Freeze for MemoryError
impl RefUnwindSafe for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnsafeUnpin for MemoryError
impl UnwindSafe for MemoryError
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