pub trait InteropValue: Copy + Debug + PartialEq {
    const TY: ValType;

    // Required methods
    fn into_value(self) -> Value;
    fn from_value(value: Value) -> Self;
}
Expand description

An InteropValue is a Rust types that can be converted into a WASM Value. This trait is intended to simplify translation between Rust values and WASM values and thus is not used internally.

Required Associated Constants§

Required Methods§

source

fn into_value(self) -> Value

source

fn from_value(value: Value) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl InteropValue for f32

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

source§

impl InteropValue for f64

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

source§

impl InteropValue for i32

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

source§

impl InteropValue for i64

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

source§

impl InteropValue for u32

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

source§

impl InteropValue for u64

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

Implementors§