Trait wasmrs_host::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(&self, bytes: Bytes) -> Result<(), Error>;
fn do_host_init(
&self,
guest_buff_ptr: u32,
host_buff_ptr: u32
) -> Result<(), Error>;
fn get_import(&self, namespace: &str, operation: &str) -> Result<u32, Error>;
fn get_export(&self, namespace: &str, operation: &str) -> Result<u32, 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§
fn do_console_log(&self, msg: &str)
sourcefn do_op_list(&self, bytes: Bytes) -> Result<(), Error>
fn do_op_list(&self, bytes: Bytes) -> Result<(), Error>
Query the operation list for the module.
sourcefn do_host_init(
&self,
guest_buff_ptr: u32,
host_buff_ptr: u32
) -> Result<(), Error>
fn do_host_init( &self, guest_buff_ptr: u32, host_buff_ptr: u32 ) -> Result<(), Error>
The callback for __wasmrs_init