[][src]Enum wasmer::MemoryError

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),
}

Error type describing things that can go wrong when operating on Wasm Memories.

Variants

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 of CouldNotGrow

current: Pages

The current size in pages.

attempted_delta: Pages

The attempted amount to grow by in pages.

InvalidMemory

The operation would cause the size of the memory size exceed the maximum.

Fields of InvalidMemory

reason: String

The reason why the provided memory is invalid.

MinimumMemoryTooLarge

Caller asked for more minimum memory than we can give them.

Fields of MinimumMemoryTooLarge

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 of MaximumMemoryTooLarge

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.

Generic(String)

A user defined error value, used for error cases not listed above.

Trait Implementations

impl Clone for MemoryError[src]

impl Debug for MemoryError[src]

impl Display for MemoryError[src]

impl Error for MemoryError[src]

impl Hash for MemoryError[src]

impl PartialEq<MemoryError> for MemoryError[src]

impl StructuralPartialEq for MemoryError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,