Struct walrus::ModuleElements
source · pub struct ModuleElements { /* private fields */ }
Expand description
All element segments of a wasm module, used to initialize anyfunc
tables,
used as function pointers.
Implementations§
source§impl ModuleElements
impl ModuleElements
sourcepub fn delete(&mut self, id: ElementId)
pub fn delete(&mut self, id: ElementId)
Delete an elements entry from this module.
It is up to you to ensure that all references to this deleted element are removed.
sourcepub fn iter(&self) -> impl Iterator<Item = &Element>
pub fn iter(&self) -> impl Iterator<Item = &Element>
Get a shared reference to this module’s elements.
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Element>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Element>
Get a mutable reference to this module’s elements.
sourcepub fn add(
&mut self,
kind: ElementKind,
ty: ValType,
members: Vec<Option<FunctionId>>
) -> ElementId
pub fn add( &mut self, kind: ElementKind, ty: ValType, members: Vec<Option<FunctionId>> ) -> ElementId
Add an element segment
Trait Implementations§
source§impl Debug for ModuleElements
impl Debug for ModuleElements
source§impl Default for ModuleElements
impl Default for ModuleElements
source§fn default() -> ModuleElements
fn default() -> ModuleElements
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ModuleElements
impl Send for ModuleElements
impl Sync for ModuleElements
impl Unpin for ModuleElements
impl UnwindSafe for ModuleElements
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more