referrerpolicy=no-referrer-when-downgrade
pub trait IntoValue {
    const VALUE_TYPE: ValueType;

    // Required method
    fn into_value(self) -> Value;
}
Expand description

Something that can be converted into a wasm compatible Value.

Required Associated Constants§

Source

const VALUE_TYPE: ValueType

The type of the value in wasm.

Required Methods§

Source

fn into_value(self) -> Value

Convert self into a wasm Value.

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 IntoValue for i8

Source§

const VALUE_TYPE: ValueType = ValueType::I32

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for i16

Source§

const VALUE_TYPE: ValueType = ValueType::I32

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for i32

Source§

const VALUE_TYPE: ValueType = ValueType::I32

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for i64

Source§

const VALUE_TYPE: ValueType = ValueType::I64

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for u8

Source§

const VALUE_TYPE: ValueType = ValueType::I32

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for u16

Source§

const VALUE_TYPE: ValueType = ValueType::I32

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for u32

Source§

const VALUE_TYPE: ValueType = ValueType::I32

Source§

fn into_value(self) -> Value

Source§

impl IntoValue for u64

Source§

const VALUE_TYPE: ValueType = ValueType::I64

Source§

fn into_value(self) -> Value

Implementors§

Source§

impl<T> IntoValue for Pointer<T>
where T: PointerType,

Source§

const VALUE_TYPE: ValueType = ValueType::I32