class Wasmer::FunctionType
- Wasmer::FunctionType
- Reference
- Object
Overview
FunctionType classifies the signature of functions, mapping a vector of parameters to a vector of results. They are also used to classify the inputs and outputs of instructions.
See also
Specification: https://webassembly.github.io/spec/core/syntax/types.html#function-types
Included Modules
Defined in:
wasmer/function.crConstructors
-
.new(params : Array(ValueType), results : Array(ValueType))
Instantiates a new FunctionType from two
ValueType
arrays: parameters and the resultsparams = Wasmer.value_types results = Wasmer.value_types(Wasmer::I32) function_type = Wasmer::FunctionType.new(params, results)
- .new
Instance Method Summary
-
#params : Array(ValueType)
Returns the parameters definitions from the FunctionType as a
ValueType
array -
#results : Array(ValueType)
Returns the results definitions from the FunctionType as a
ValueType
array - #to_externtype : ExternType
Instance methods inherited from module Wasmer::WithExternType
to_externtype : ExternType
to_externtype
Constructor Detail
Instantiates a new FunctionType from two ValueType
arrays: parameters and the results
params = Wasmer.value_types
results = Wasmer.value_types(Wasmer::I32)
function_type = Wasmer::FunctionType.new(params, results)
Instance Method Detail
Returns the parameters definitions from the FunctionType as
a ValueType
array
Returns the results definitions from the FunctionType as
a ValueType
array