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, items: ElementItems) -> ElementId
pub fn add(&mut self, kind: ElementKind, items: ElementItems) -> 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 Freeze for ModuleElements
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