Enum gstd::errors::MemoryError
source · #[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 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 From<MemoryError> for ExtError
impl From<MemoryError> for ExtError
source§fn from(original: MemoryError) -> ExtError
fn from(original: MemoryError) -> ExtError
Converts to this type from the input type.
source§impl Hash for MemoryError
impl Hash for MemoryError
source§impl Ord for MemoryError
impl Ord for MemoryError
source§fn cmp(&self, other: &MemoryError) -> Ordering
fn cmp(&self, other: &MemoryError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MemoryError
impl PartialEq for MemoryError
source§impl PartialOrd for MemoryError
impl PartialOrd for MemoryError
source§impl Sequence for MemoryError
impl Sequence for MemoryError
source§const CARDINALITY: usize = 2usize
const CARDINALITY: usize = 2usize
Number of values of type
Self
. Read moresource§fn next(&self) -> Option<MemoryError>
fn next(&self) -> Option<MemoryError>
source§fn previous(&self) -> Option<MemoryError>
fn previous(&self) -> Option<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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
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
Checks if this value is equivalent to the given key. Read more