Enum wasmer_vm::MemoryError
source · 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,
},
Generic(String),
}
Expand description
Error type describing things that can go wrong when operating on Wasm Memories.
Variants§
Region(String)
Low level error with mmap.
CouldNotGrow
Fields
The operation would cause the size of the memory to exceed the maximum or would cause an overflow leading to unindexable memory.
InvalidMemory
The operation would cause the size of the memory size exceed the maximum.
MinimumMemoryTooLarge
Fields
Caller asked for more minimum memory than we can give them.
MaximumMemoryTooLarge
Fields
Caller asked for a maximum memory greater than we can give them.
Generic(String)
A user defined error value, used for error cases not listed above.
Trait Implementations§
source§impl Clone for MemoryError
impl Clone for MemoryError
source§fn clone(&self) -> MemoryError
fn clone(&self) -> MemoryError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MemoryError
impl Debug for MemoryError
source§impl Display for MemoryError
impl Display for MemoryError
source§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)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl Hash for MemoryError
impl Hash for MemoryError
source§impl PartialEq<MemoryError> for MemoryError
impl PartialEq<MemoryError> for MemoryError
source§fn eq(&self, other: &MemoryError) -> bool
fn eq(&self, other: &MemoryError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for MemoryError
impl StructuralEq for MemoryError
impl StructuralPartialEq for MemoryError
Auto Trait Implementations§
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 = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.