pub enum FuncKind<'a> {
    Import(InlineImport<'a>),
    Inline {
        locals: Vec<Local<'a>>,
        expression: Expression<'a>,
    },
}
Expand description

Possible ways to define a function in the text format.

Variants

Import(InlineImport<'a>)

A function which is actually defined as an import, such as:

(func (type 3) (import "foo" "bar"))

Inline

Fields

locals: Vec<Local<'a>>

The list of locals, if any, for this function.

expression: Expression<'a>

The instructions of the function.

Almost all functions, those defined inline in a wasm module.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.