wasmtime_environ

Trait TypeConvert

Source
pub trait TypeConvert {
Show 14 methods // Required methods fn lookup_heap_type(&self, index: UnpackedIndex) -> WasmHeapType; fn lookup_type_index(&self, index: UnpackedIndex) -> EngineOrModuleTypeIndex; // Provided methods fn convert_global_type(&self, ty: &GlobalType) -> Global { ... } fn convert_table_type(&self, ty: &TableType) -> Result<Table, WasmError> { ... } fn convert_sub_type(&self, ty: &SubType) -> WasmSubType { ... } fn convert_composite_type(&self, ty: &CompositeType) -> WasmCompositeType { ... } fn convert_struct_type(&self, ty: &StructType) -> WasmStructType { ... } fn convert_array_type(&self, ty: &ArrayType) -> WasmArrayType { ... } fn convert_field_type(&self, ty: &FieldType) -> WasmFieldType { ... } fn convert_storage_type(&self, ty: &StorageType) -> WasmStorageType { ... } fn convert_func_type(&self, ty: &FuncType) -> WasmFuncType { ... } fn convert_valtype(&self, ty: ValType) -> WasmValType { ... } 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§

Source

fn lookup_heap_type(&self, index: UnpackedIndex) -> WasmHeapType

Converts the specified type index from a heap type into a canonicalized heap type.

Source

fn lookup_type_index(&self, index: UnpackedIndex) -> EngineOrModuleTypeIndex

Converts the specified type index from a heap type into a canonicalized heap type.

Provided Methods§

Source

fn convert_global_type(&self, ty: &GlobalType) -> Global

Converts a wasmparser table type into a wasmtime type

Source

fn convert_table_type(&self, ty: &TableType) -> Result<Table, WasmError>

Converts a wasmparser table type into a wasmtime type

Source

fn convert_sub_type(&self, ty: &SubType) -> WasmSubType

Source

fn convert_composite_type(&self, ty: &CompositeType) -> WasmCompositeType

Source

fn convert_struct_type(&self, ty: &StructType) -> WasmStructType

Source

fn convert_array_type(&self, ty: &ArrayType) -> WasmArrayType

Source

fn convert_field_type(&self, ty: &FieldType) -> WasmFieldType

Source

fn convert_storage_type(&self, ty: &StorageType) -> WasmStorageType

Source

fn convert_func_type(&self, ty: &FuncType) -> WasmFuncType

Converts a wasmparser function type to a wasmtime type

Source

fn convert_valtype(&self, ty: ValType) -> WasmValType

Converts a wasmparser value type to a wasmtime type

Source

fn convert_ref_type(&self, ty: RefType) -> WasmRefType

Converts a wasmparser reference type to a wasmtime type

Source

fn convert_heap_type(&self, ty: HeapType) -> WasmHeapType

Converts a wasmparser heap type to a wasmtime type

Implementors§