[−][src]Struct walrus::ModuleGlobals
The set of globals in each function in this module.
Methods
impl ModuleGlobals
[src]
pub fn add_import(
&mut self,
ty: ValType,
mutable: bool,
import_id: ImportId
) -> GlobalId
[src]
&mut self,
ty: ValType,
mutable: bool,
import_id: ImportId
) -> GlobalId
Adds a new imported global to this list.
pub fn add_local(
&mut self,
ty: ValType,
mutable: bool,
init: InitExpr
) -> GlobalId
[src]
&mut self,
ty: ValType,
mutable: bool,
init: InitExpr
) -> GlobalId
Construct a new global, that does not originate from any of the input wasm globals.
pub fn get(&self, id: GlobalId) -> &Global
[src]
Gets a reference to a memory given its id
pub fn get_mut(&mut self, id: GlobalId) -> &mut Global
[src]
Gets a reference to a memory given its id
pub fn delete(&mut self, id: GlobalId)
[src]
Removes a global from this module.
It is up to you to ensure that any potential references to the deleted
global are also removed, eg get_global
expressions.
pub fn iter(&self) -> impl Iterator<Item = &Global>
[src]
Get a shared reference to this module's globals.
Trait Implementations
impl Default for ModuleGlobals
[src]
fn default() -> ModuleGlobals
[src]
impl Debug for ModuleGlobals
[src]
Auto Trait Implementations
impl Sync for ModuleGlobals
impl Send for ModuleGlobals
impl Unpin for ModuleGlobals
impl RefUnwindSafe for ModuleGlobals
impl UnwindSafe for ModuleGlobals
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,