Enum wasmer_vm::MemoryError
#[non_exhaustive]pub enum MemoryError {
Region(String),
CouldNotGrow {
current: Pages,
attempted_delta: Pages,
},
InvalidMemory {
reason: String,
},
MinimumMemoryTooLarge {
min_requested: Pages,
max_allowed: Pages,
},
MaximumMemoryTooLarge {
max_requested: Pages,
max_allowed: Pages,
},
MemoryNotShared,
UnsupportedOperation {
message: String,
},
AtomicsNotSupported,
Generic(String),
}
Expand description
Error type describing things that can go wrong when operating on Wasm Memories.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Region(String)
Low level error with mmap.
CouldNotGrow
The operation would cause the size of the memory to exceed the maximum or would cause an overflow leading to unindexable memory.
Fields
current: Pages
The current size in pages.
attempted_delta: Pages
The attempted amount to grow by in pages.
InvalidMemory
Invalid memory was provided.
MinimumMemoryTooLarge
Caller asked for more minimum memory than we can give them.
Fields
min_requested: Pages
The number of pages requested as the minimum amount of memory.
max_allowed: Pages
The maximum amount of memory we can allocate.
MaximumMemoryTooLarge
Caller asked for a maximum memory greater than we can give them.
Fields
max_requested: Pages
The number of pages requested as the maximum amount of memory.
max_allowed: Pages
The number of pages requested as the maximum amount of memory.
Returned when a shared memory is required, but the given memory is not shared.
UnsupportedOperation
Returned when trying to call a memory operation that is not supported by the particular memory implementation.
AtomicsNotSupported
The memory does not support atomic operations.
Generic(String)
A user defined error value, used for error cases not listed above.
Trait Implementations§
§impl Clone for MemoryError
impl Clone for MemoryError
§fn clone(&self) -> MemoryError
fn clone(&self) -> MemoryError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for MemoryError
impl Debug for MemoryError
§impl Display for MemoryError
impl Display for MemoryError
§impl Error for MemoryError
impl Error for MemoryError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
§impl Hash for MemoryError
impl Hash for MemoryError
§impl PartialEq for MemoryError
impl PartialEq for MemoryError
§fn eq(&self, other: &MemoryError) -> bool
fn eq(&self, other: &MemoryError) -> bool
self
and other
values to be equal, and is used
by ==
.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 UnwindSafe for MemoryError
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.