Trait cranelift_wasm::TypeConvert
source · pub trait TypeConvert {
// Required method
fn lookup_heap_type(&self, index: TypeIndex) -> WasmHeapType;
// Provided methods
fn convert_global_type(&self, ty: &GlobalType) -> Global { ... }
fn convert_table_type(&self, ty: &TableType) -> Table { ... }
fn convert_func_type(&self, ty: &FuncType) -> WasmFuncType { ... }
fn convert_valtype(&self, ty: ValType) -> WasmType { ... }
fn convert_ref_type(&self, ty: RefType) -> WasmRefType { ... }
fn convert_heap_type(&self, ty: HeapType) -> WasmHeapType { ... }
}
Expand description
Helpers used to convert a wasmparser
type to a type in this crate.
Required Methods§
sourcefn lookup_heap_type(&self, index: TypeIndex) -> WasmHeapType
fn lookup_heap_type(&self, index: TypeIndex) -> WasmHeapType
Converts the specified type index from a heap type into a canonicalized heap type.
Provided Methods§
sourcefn convert_global_type(&self, ty: &GlobalType) -> Global
fn convert_global_type(&self, ty: &GlobalType) -> Global
Converts a wasmparser table type into a wasmtime type
sourcefn convert_table_type(&self, ty: &TableType) -> Table
fn convert_table_type(&self, ty: &TableType) -> Table
Converts a wasmparser table type into a wasmtime type
sourcefn convert_func_type(&self, ty: &FuncType) -> WasmFuncType
fn convert_func_type(&self, ty: &FuncType) -> WasmFuncType
Converts a wasmparser function type to a wasmtime type
sourcefn convert_valtype(&self, ty: ValType) -> WasmType
fn convert_valtype(&self, ty: ValType) -> WasmType
Converts a wasmparser value type to a wasmtime type
sourcefn convert_ref_type(&self, ty: RefType) -> WasmRefType
fn convert_ref_type(&self, ty: RefType) -> WasmRefType
Converts a wasmparser reference type to a wasmtime type
sourcefn convert_heap_type(&self, ty: HeapType) -> WasmHeapType
fn convert_heap_type(&self, ty: HeapType) -> WasmHeapType
Converts a wasmparser heap type to a wasmtime type