[][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 builder(&self) -> &FunctionBuilder[src]

Get access to a FunctionBuilder to continue adding expressions to this function.

pub fn builder_mut(&mut self) -> &mut FunctionBuilder[src]

Get access to a FunctionBuilder to continue adding expressions to this function.

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 Display for LocalFunction[src]

impl Debug for LocalFunction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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