[−][src]Struct walrus::ModuleMemories
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]
&mut self,
shared: bool,
initial: u32,
maximum: Option<u32>,
import: ImportId
) -> MemoryId
Add an imported memory
pub fn add_local(
&mut self,
shared: bool,
initial: u32,
maximum: Option<u32>
) -> MemoryId
[src]
&mut self,
shared: bool,
initial: u32,
maximum: Option<u32>
) -> MemoryId
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 delete(&mut self, id: MemoryId)
[src]
Removes a memory from this module.
It is up to you to ensure that any potential references to the deleted
memory are also removed, eg mem.load
expressions and exports.
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]
fn default() -> ModuleMemories
[src]
impl Debug for ModuleMemories
[src]
Auto Trait Implementations
impl Send for ModuleMemories
impl Sync for ModuleMemories
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,