Trait InteropValue

Source
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

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 InteropValue for f32

Source§

impl InteropValue for f64

Source§

impl InteropValue for i32

Source§

impl InteropValue for i64

Source§

impl InteropValue for u32

Source§

impl InteropValue for u64

Implementors§