wasmer

Trait NativeWasmTypeInto

Source
pub trait NativeWasmTypeInto: NativeWasmType + Sized {
    // Required methods
    fn into_raw(self, store: &mut impl AsStoreMut) -> RawValue;
    unsafe fn from_raw(store: &mut impl AsStoreMut, raw: RawValue) -> Self;
}
Expand description

NativeWasmTypeInto performs conversions from and into NativeWasmType types with a context.

Required Methods§

Source

fn into_raw(self, store: &mut impl AsStoreMut) -> RawValue

Convert self to raw value representation.

Source

unsafe fn from_raw(store: &mut impl AsStoreMut, raw: RawValue) -> Self

Convert to self from raw value representation.

§Safety

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 NativeWasmTypeInto for Option<ExternRef>

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for Option<Function>

Source§

fn into_raw(self, store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for f32

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for f64

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for i32

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for i64

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for u32

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for u64

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Source§

impl NativeWasmTypeInto for u128

Source§

fn into_raw(self, _store: &mut impl AsStoreMut) -> RawValue

Source§

unsafe fn from_raw(_store: &mut impl AsStoreMut, raw: RawValue) -> Self

Implementors§