[][src]Struct walrus::LocalFunction

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

A function defined locally within the wasm module.

Fields

args: Vec<LocalId>

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

Methods

impl LocalFunction[src]

pub fn ty(&self) -> TypeId[src]

Get this function's type.

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

Get the id of this function's entry block.

pub fn block(&self, id: InstrSeqId) -> &InstrSeq[src]

Get the block associated with the given id.

pub fn block_mut(&mut self, id: InstrSeqId) -> &mut InstrSeq[src]

Get the block associated with the given id.

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

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

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

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

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

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

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

Is this function's body a constant instruction?

pub fn used_data_segments(&self) -> HashSet<Id<Data>, BuildIdHasher>[src]

Collect the set of data segments that are used in this function via memory.init or data.drop instructions.

Trait Implementations

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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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