[]Struct wasmer_runtime::types::MemoryDescriptor

pub struct MemoryDescriptor {
    pub minimum: Pages,
    pub maximum: Option<Pages>,
    pub shared: bool,
}

A descriptor for a WebAssembly memory type.

Memories are described in units of pages (64KB) and represent contiguous chunks of addressable memory.

Fields

minimum: Pages

The minimum number of pages in the memory.

maximum: Option<Pages>

The maximum number of pages in the memory.

shared: bool

Whether the memory may be shared between multiple threads.

Implementations

impl MemoryType

pub fn new<IntoPages>(
    minimum: IntoPages,
    maximum: Option<IntoPages>,
    shared: bool
) -> MemoryType where
    IntoPages: Into<Pages>, 

Creates a new descriptor for a WebAssembly memory given the specified limits of the memory.

Trait Implementations

impl Clone for MemoryType

impl Copy for MemoryType

impl Debug for MemoryType

impl<'de> Deserialize<'de> for MemoryType

impl Display for MemoryType

impl Eq for MemoryType

impl Hash for MemoryType

impl PartialEq<MemoryType> for MemoryType

impl Serialize for MemoryType

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.