[−][src]Struct walrus::ModuleFunctions
The set of functions within a module.
Methods
impl ModuleFunctions
[src]
pub fn new() -> ModuleFunctions
[src]
Construct a new, empty set of functions for a module.
pub fn add_import(&mut self, ty: TypeId, import: ImportId) -> FunctionId
[src]
Create a new externally defined, imported function.
pub fn add_local(&mut self, func: LocalFunction) -> FunctionId
[src]
Create a new internally defined function
pub fn get(&self, id: FunctionId) -> &Function
[src]
Gets a reference to a function given its id
pub fn get_mut(&mut self, id: FunctionId) -> &mut Function
[src]
Gets a reference to a function given its id
pub fn iter(
&self
) -> impl Iterator<Item = &Function>
[src]
&self
) -> impl Iterator<Item = &Function>
Get a shared reference to this module's functions.
pub fn par_iter(
&self
) -> impl ParallelIterator<Item = &Function>
[src]
&self
) -> impl ParallelIterator<Item = &Function>
Get a shared reference to this module's functions.
pub fn iter_local(
&self
) -> impl Iterator<Item = (FunctionId, &LocalFunction)>
[src]
&self
) -> impl Iterator<Item = (FunctionId, &LocalFunction)>
Get an iterator of this module's local functions
pub fn par_iter_local(
&self
) -> impl ParallelIterator<Item = (FunctionId, &LocalFunction)>
[src]
&self
) -> impl ParallelIterator<Item = (FunctionId, &LocalFunction)>
Get a parallel iterator of this module's local functions
pub fn iter_mut(
&mut self
) -> impl Iterator<Item = &mut Function>
[src]
&mut self
) -> impl Iterator<Item = &mut Function>
Get a mutable reference to this module's functions.
pub fn par_iter_mut(
&mut self
) -> impl ParallelIterator<Item = &mut Function>
[src]
&mut self
) -> impl ParallelIterator<Item = &mut Function>
Get a mutable reference to this module's functions.
pub fn iter_local_mut(
&mut self
) -> impl Iterator<Item = (FunctionId, &mut LocalFunction)>
[src]
&mut self
) -> impl Iterator<Item = (FunctionId, &mut LocalFunction)>
Get an iterator of this module's local functions
pub fn par_iter_local_mut(
&mut self
) -> impl ParallelIterator<Item = (FunctionId, &mut LocalFunction)>
[src]
&mut self
) -> impl ParallelIterator<Item = (FunctionId, &mut LocalFunction)>
Get a parallel iterator of this module's local functions
Trait Implementations
impl Default for ModuleFunctions
[src]
fn default() -> ModuleFunctions
[src]
impl Debug for ModuleFunctions
[src]
Auto Trait Implementations
impl Send for ModuleFunctions
impl Sync for ModuleFunctions
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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> 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>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,