Trait CallbackProvider

Source
pub trait CallbackProvider {
    // Required methods
    fn do_host_send(&self, frame_bytes: Bytes) -> Result<(), Error>;
    fn do_console_log(&self, msg: &str);
    fn do_op_list(&mut self, bytes: Bytes) -> Result<(), Error>;
    fn do_host_init(
        &self,
        guest_buff_ptr: u32,
        host_buff_ptr: u32,
    ) -> Result<(), Error>;
}
Expand description

The trait that a host needs to implement to satisfy wasmrs protocol imports and to query data about the loaded module.

Required Methods§

Source

fn do_host_send(&self, frame_bytes: Bytes) -> Result<(), Error>

The callback for __wasmrs_send

Source

fn do_console_log(&self, msg: &str)

Source

fn do_op_list(&mut self, bytes: Bytes) -> Result<(), Error>

Query the operation list for the module.

Source

fn do_host_init( &self, guest_buff_ptr: u32, host_buff_ptr: u32, ) -> Result<(), Error>

The callback for __wasmrs_init

Implementors§