pub struct Roots { /* private fields */ }Expand description
Set of all root used items in a wasm module.
Implementations§
Source§impl Roots
impl Roots
Sourcepub fn push_func(&mut self, func: FunctionId, from: Location) -> &mut Roots
pub fn push_func(&mut self, func: FunctionId, from: Location) -> &mut Roots
Adds a new function to the set of roots
Sourcepub fn push_table(&mut self, table: TableId) -> &mut Roots
pub fn push_table(&mut self, table: TableId) -> &mut Roots
Adds a new table to the set of roots
Sourcepub fn push_memory(&mut self, memory: MemoryId) -> &mut Roots
pub fn push_memory(&mut self, memory: MemoryId) -> &mut Roots
Adds a new memory to the set of roots
Sourcepub fn push_global(&mut self, global: GlobalId) -> &mut Roots
pub fn push_global(&mut self, global: GlobalId) -> &mut Roots
Adds a new global to the set of roots
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Roots
impl RefUnwindSafe for Roots
impl Send for Roots
impl Sync for Roots
impl Unpin for Roots
impl UnwindSafe for Roots
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more