pub trait WasmFuncType {
    // Required methods
    fn len_inputs(&self) -> usize;
    fn len_outputs(&self) -> usize;
    fn input_at(&self, at: u32) -> Option<ValType>;
    fn output_at(&self, at: u32) -> Option<ValType>;

    // Provided methods
    fn inputs(&self) -> WasmFuncTypeInputs<'_, Self> 
       where Self: Sized { ... }
    fn outputs(&self) -> WasmFuncTypeOutputs<'_, Self> 
       where Self: Sized { ... }
}
Expand description

Types that qualify as Wasm function types for validation purposes.

Required Methods§

source

fn len_inputs(&self) -> usize

Returns the number of input types.

source

fn len_outputs(&self) -> usize

Returns the number of output types.

source

fn input_at(&self, at: u32) -> Option<ValType>

Returns the type at given index if any.

Note

The returned type may be wrapped by the user crate and thus the actually returned type only has to be comparable to a Wasm type.

source

fn output_at(&self, at: u32) -> Option<ValType>

Returns the type at given index if any.

Note

The returned type may be wrapped by the user crate and thus the actually returned type only has to be comparable to a Wasm type.

Provided Methods§

source

fn inputs(&self) -> WasmFuncTypeInputs<'_, Self> where Self: Sized,

Returns the list of inputs as an iterator.

source

fn outputs(&self) -> WasmFuncTypeOutputs<'_, Self> where Self: Sized,

Returns the list of outputs as an iterator.

Implementations on Foreign Types§

source§

impl<T> WasmFuncType for &Twhere T: ?Sized + WasmFuncType,

Implementors§