#[non_exhaustive]#[repr(u32)]pub enum MemoryError {
RuntimeAllocOutOfBounds = 200,
AccessOutOfBounds = 201,
}
Expand description
Memory error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RuntimeAllocOutOfBounds = 200
The error occurs, when program tries to allocate in block-chain runtime more memory than allowed.
AccessOutOfBounds = 201
The error occurs in attempt to access memory outside wasm program memory.
Trait Implementations§
Source§impl Clone for MemoryError
impl Clone for MemoryError
Source§fn clone(&self) -> MemoryError
fn clone(&self) -> MemoryError
Returns a duplicate 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)>
Returns 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 From<MemoryError> for ExtError
impl From<MemoryError> for ExtError
Source§fn from(source: MemoryError) -> Self
fn from(source: MemoryError) -> Self
Converts to this type from the input type.
Source§impl Hash for MemoryError
impl Hash for MemoryError
Source§impl PartialEq for MemoryError
impl PartialEq for MemoryError
Source§impl Sequence for MemoryError
impl Sequence for MemoryError
impl Copy 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 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