Trait sp_wasm_interface::IntoValue

source ·
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.

Object Safety§

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: PointerType> IntoValue for Pointer<T>

source§

const VALUE_TYPE: ValueType = ValueType::I32