[][src]Struct walrus::LocalFunction

pub struct LocalFunction {
    pub ty: TypeId,
    pub args: Vec<LocalId>,
    // some fields omitted
}

A function defined locally within the wasm module.

Fields

ty: TypeId

This function's type.

args: Vec<LocalId>

Arguments to this function, and the locals that they're assigned to

Methods

impl LocalFunction[src]

pub fn entry_block(&self) -> BlockId[src]

Get the id of this function's entry block.

pub fn block(&self, block: BlockId) -> &Block[src]

Get the block associated with the given id.

pub fn block_mut(&mut self, block: BlockId) -> &mut Block[src]

Get the block associated with the given id.

pub fn get(&self, id: ExprId) -> &Expr[src]

Get the expression associated with the given id

pub fn get_mut(&mut self, id: ExprId) -> &mut Expr[src]

Get the expression associated with the given id

pub fn size(&self) -> u64[src]

Get the size of this function, in number of expressions.

pub fn is_const(&self) -> bool[src]

Is this function's body a constant expression?

Trait Implementations

impl Dot for LocalFunction[src]

impl Debug for LocalFunction[src]

impl Display for LocalFunction[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[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, 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]

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