[−][src]Struct walrus::MemoryData
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]
&'a self
) -> impl Iterator<Item = GlobalId> + 'a
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]
self
) -> impl Iterator<Item = (InitExpr, Vec<u8>)>
Consumes this data and returns a by-value iterator of each segment
Trait Implementations
Auto Trait Implementations
impl Send for MemoryData
impl Sync for MemoryData
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,