Trait soroban_env_host_zephyr::vm::CustomContextVM

source ·
pub trait CustomContextVM {
    // Required methods
    fn read(&self, mem_pos: usize, buf: &mut [u8]);
    fn data(&self) -> &[u8] ;
    fn write(&mut self, pos: u32, slice: &[u8]) -> i64;
    fn data_mut(&mut self) -> &mut [u8] ;
}
Expand description

A trait that VMs that want to work with a custom context should implement.

Required Methods§

source

fn read(&self, mem_pos: usize, buf: &mut [u8])

Return WASMI’s Memory handle.

source

fn data(&self) -> &[u8]

source

fn write(&mut self, pos: u32, slice: &[u8]) -> i64

source

fn data_mut(&mut self) -> &mut [u8]

Implementors§