[][src]Struct walrus::MemoryData

pub struct MemoryData { /* fields omitted */ }

An abstraction for the initialization values of a Memory.

This houses all the data sections of a wasm executable that as associated with this Memory.

Methods

impl MemoryData[src]

pub fn add_absolute(&mut self, pos: u32, data: Vec<u8>)[src]

Adds a new chunk of data in this ModuleData at an absolute address

pub fn add_relative(&mut self, id: GlobalId, data: Vec<u8>)[src]

Adds a new chunk of data in this ModuleData at a relative address

pub fn globals<'a>(
    &'a self
) -> impl Iterator<Item = GlobalId> + 'a
[src]

Returns an iterator of all globals used as relative bases

pub fn is_empty(&self) -> bool[src]

Returns whether this data has no initialization sections

pub fn into_iter(
    self
) -> impl Iterator<Item = (InitExpr, Vec<u8>)>
[src]

Consumes this data and returns a by-value iterator of each segment

Trait Implementations

impl Default for MemoryData[src]

impl Debug for MemoryData[src]

Auto Trait Implementations

impl Send for MemoryData

impl Sync for MemoryData

Blanket Implementations

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

impl<T> From for 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> 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.

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