[][src]Struct wasmer_runtime_near::wasm::MemoryDescriptor

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

A wasm memory descriptor.

Fields

minimum: Pages

The minimum number of allowed pages.

maximum: Option<Pages>

The maximum number of allowed pages.

shared: bool

This memory can be shared between wasm threads.

memory_type: MemoryType

The type of the memory

Implementations

impl MemoryDescriptor[src]

pub fn new(
    minimum: Pages,
    maximum: Option<Pages>,
    shared: bool
) -> Result<MemoryDescriptor, String>
[src]

Create a new memory descriptor with the given min/max pages and shared flag.

pub fn memory_type(&self) -> MemoryType[src]

Returns the MemoryType for this descriptor.

Trait Implementations

impl Clone for MemoryDescriptor[src]

impl Copy for MemoryDescriptor[src]

impl Debug for MemoryDescriptor[src]

impl<'de> Deserialize<'de> for MemoryDescriptor[src]

impl Eq for MemoryDescriptor[src]

impl<'_> From<&'_ MemoryDescriptor> for ExternDescriptor[src]

impl From<MemoryDescriptor> for ExternDescriptor[src]

impl PartialEq<MemoryDescriptor> for MemoryDescriptor[src]

impl Serialize for MemoryDescriptor[src]

impl StructuralEq for MemoryDescriptor[src]

impl StructuralPartialEq for MemoryDescriptor[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> 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, 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.