wasmedge_sdk

Trait WasmValType

Source
pub trait WasmValType {
    const WASM_TYPE: ValType;
}
Expand description

Describes the mapping of Rust type to Wasm type.

use wasmedge_sdk::{WasmValType, ValType};

assert_eq!(i32::WASM_TYPE, ValType::I32);

Required Associated Constants§

Source

const WASM_TYPE: ValType

The Wasm type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WasmValType for f32

Source§

const WASM_TYPE: ValType = ValType::F32

Source§

impl WasmValType for f64

Source§

const WASM_TYPE: ValType = ValType::F64

Source§

impl WasmValType for i8

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for i16

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for i32

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for i64

Source§

const WASM_TYPE: ValType = ValType::I64

Source§

impl WasmValType for i128

Source§

const WASM_TYPE: ValType = ValType::V128

Source§

impl WasmValType for u8

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for u16

Source§

const WASM_TYPE: ValType = ValType::I32

Source§

impl WasmValType for u32

Source§

const WASM_TYPE: ValType = ValType::I64

Implementors§

Source§

impl WasmValType for ExternRef

Source§

const WASM_TYPE: ValType = ValType::ExternRef