[][src]Trait witx_gen::WasmValue

pub trait WasmValue: Debug + Copy {
    const SIZE: u32;
    const ARRAY_OFFSET: u32;

    fn read(mem: &[Cell<u8>]) -> Self;
fn write(self, mem: &[Cell<u8>]); }

A value that can be stored into WASM memory.

Associated Constants

const SIZE: u32

Size of a value

const ARRAY_OFFSET: u32

Offset between two elements of this type inside an array.

Loading content...

Required methods

fn read(mem: &[Cell<u8>]) -> Self

Reads the value from memory at the given offset.

fn write(self, mem: &[Cell<u8>])

Writes the value to memory at the given offset.

Loading content...

Implementations on Foreign Types

impl WasmValue for u8[src]

impl WasmValue for i8[src]

impl WasmValue for u16[src]

impl WasmValue for i16[src]

impl WasmValue for u32[src]

impl WasmValue for i32[src]

impl WasmValue for u64[src]

impl WasmValue for i64[src]

impl WasmValue for f32[src]

impl WasmValue for f64[src]

Loading content...

Implementors

impl<T: WasmValue> WasmValue for WasmSlicePtr<T>[src]

impl<T: WasmValue> WasmValue for WasmValuePtr<T>[src]

Loading content...