[][src]Struct walrus::ModuleFunctions

pub struct ModuleFunctions { /* fields omitted */ }

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]

Get a shared reference to this module's functions.

pub fn par_iter(
    &self
) -> impl ParallelIterator<Item = &Function>
[src]

Get a shared reference to this module's functions.

pub fn iter_local(
    &self
) -> impl Iterator<Item = (FunctionId, &LocalFunction)>
[src]

Get an iterator of this module's local functions

pub fn par_iter_local(
    &self
) -> impl ParallelIterator<Item = (FunctionId, &LocalFunction)>
[src]

Get a parallel iterator of this module's local functions

pub fn iter_mut(
    &mut self
) -> impl Iterator<Item = &mut Function>
[src]

Get a mutable reference to this module's functions.

pub fn par_iter_mut(
    &mut self
) -> impl ParallelIterator<Item = &mut Function>
[src]

Get a mutable reference to this module's functions.

pub fn iter_local_mut(
    &mut self
) -> impl Iterator<Item = (FunctionId, &mut LocalFunction)>
[src]

Get an iterator of this module's local functions

pub fn par_iter_local_mut(
    &mut self
) -> impl ParallelIterator<Item = (FunctionId, &mut LocalFunction)>
[src]

Get a parallel iterator of this module's local functions

Trait Implementations

impl Default for ModuleFunctions[src]

impl Debug for ModuleFunctions[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]