[][src]Struct walrus::ModuleMemories

pub struct ModuleMemories { /* fields omitted */ }

The set of memories in this module.

Methods

impl ModuleMemories[src]

pub fn add_import(
    &mut self,
    shared: bool,
    initial: u32,
    maximum: Option<u32>,
    import: ImportId
) -> MemoryId
[src]

Add an imported memory

pub fn add_local(
    &mut self,
    shared: bool,
    initial: u32,
    maximum: Option<u32>
) -> MemoryId
[src]

Construct a new memory, that does not originate from any of the input wasm memories.

pub fn get(&self, id: MemoryId) -> &Memory[src]

Gets a reference to a memory given its id

pub fn get_mut(&mut self, id: MemoryId) -> &mut Memory[src]

Gets a reference to a memory given its id

pub fn iter(
    &self
) -> impl Iterator<Item = &Memory>
[src]

Get a shared reference to this module's memories.

pub fn iter_mut(
    &mut self
) -> impl Iterator<Item = &mut Memory>
[src]

Get a mutable reference to this module's memories.

Trait Implementations

impl Default for ModuleMemories[src]

impl Debug for ModuleMemories[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.