Trait WasmValueType

Source
pub trait WasmValueType: Debug + 'static {
    // Required methods
    unsafe fn write_value_to(&self, p: *mut i128);
    unsafe fn read_value_from(store: &dyn Any, p: *const i128) -> Self;
}
Expand description

Trait for reading and writing Wasm values into binary for use on the layer between the API and the VM internals, specifically with wasmer_types::Value.

Required Methods§

Source

unsafe fn write_value_to(&self, p: *mut i128)

Write the value

Source

unsafe fn read_value_from(store: &dyn Any, p: *const i128) -> Self

read the 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 WasmValueType for ()

Source§

unsafe fn write_value_to(&self, _p: *mut i128)

Source§

unsafe fn read_value_from(_store: &dyn Any, _p: *const i128) -> Self

Implementors§