[][src]Trait witx_gen::WasiValue

pub trait WasiValue: Sized {
    type NativeType: Copy + Debug;
    fn from_native(
        native: Self::NativeType
    ) -> Result<Self, WasiValueError<Self>>;
fn to_native(self) -> Self::NativeType; }

Trait to convert WASI values between the Rust and native WASM representation.

Associated Types

type NativeType: Copy + Debug

The native WASM type.

Loading content...

Required methods

fn from_native(native: Self::NativeType) -> Result<Self, WasiValueError<Self>>

Converts a native WASM value to its Rust representation.

fn to_native(self) -> Self::NativeType

Converts a Rust value to its native WASM representation.

Loading content...

Implementors

Loading content...