pub trait HostInstance: Send {
// Required methods
fn get_module(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
) -> impl Future<Output = Result<Resource<Module>>> + Send;
fn get_memory(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
memory_index: u32,
) -> impl Future<Output = Result<Resource<Memory>, Error>> + Send;
fn get_global(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
global_index: u32,
) -> impl Future<Output = Result<Resource<Global>, Error>> + Send;
fn get_table(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
table_index: u32,
) -> impl Future<Output = Result<Resource<Table>, Error>> + Send;
fn get_func(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
func_index: u32,
) -> impl Future<Output = Result<Resource<WasmFunc>, Error>> + Send;
fn get_tag(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
tag_index: u32,
) -> impl Future<Output = Result<Resource<WasmTag>, Error>> + Send;
fn clone(
&mut self,
self_: Resource<Instance>,
) -> impl Future<Output = Result<Resource<Instance>>> + Send;
fn unique_id(
&mut self,
self_: Resource<Instance>,
) -> impl Future<Output = Result<u64>> + Send;
fn drop(
&mut self,
rep: Resource<Instance>,
) -> impl Future<Output = Result<()>> + Send;
}Required Methods§
Sourcefn get_module(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
) -> impl Future<Output = Result<Resource<Module>>> + Send
fn get_module( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, ) -> impl Future<Output = Result<Resource<Module>>> + Send
Get this instance’s module.
Sourcefn get_memory(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
memory_index: u32,
) -> impl Future<Output = Result<Resource<Memory>, Error>> + Send
fn get_memory( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, memory_index: u32, ) -> impl Future<Output = Result<Resource<Memory>, Error>> + Send
Get a memory from this instance’s memory index space.
Sourcefn get_global(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
global_index: u32,
) -> impl Future<Output = Result<Resource<Global>, Error>> + Send
fn get_global( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, global_index: u32, ) -> impl Future<Output = Result<Resource<Global>, Error>> + Send
Get a global from this instance’s global index space.
Sourcefn get_table(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
table_index: u32,
) -> impl Future<Output = Result<Resource<Table>, Error>> + Send
fn get_table( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, table_index: u32, ) -> impl Future<Output = Result<Resource<Table>, Error>> + Send
Get a table from this instance’s table index space.
Sourcefn get_func(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
func_index: u32,
) -> impl Future<Output = Result<Resource<WasmFunc>, Error>> + Send
fn get_func( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, func_index: u32, ) -> impl Future<Output = Result<Resource<WasmFunc>, Error>> + Send
Get a function from this instance’s function index space.
Sourcefn get_tag(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
tag_index: u32,
) -> impl Future<Output = Result<Resource<WasmTag>, Error>> + Send
fn get_tag( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, tag_index: u32, ) -> impl Future<Output = Result<Resource<WasmTag>, Error>> + Send
Get a tag from this instance’s tag index space.
Sourcefn clone(
&mut self,
self_: Resource<Instance>,
) -> impl Future<Output = Result<Resource<Instance>>> + Send
fn clone( &mut self, self_: Resource<Instance>, ) -> impl Future<Output = Result<Resource<Instance>>> + Send
Clone this handle.
Sourcefn unique_id(
&mut self,
self_: Resource<Instance>,
) -> impl Future<Output = Result<u64>> + Send
fn unique_id( &mut self, self_: Resource<Instance>, ) -> impl Future<Output = Result<u64>> + Send
Get the unique ID of this instance (within the debuggee) to allow equality and hashing.
fn drop( &mut self, rep: Resource<Instance>, ) -> impl Future<Output = Result<()>> + Send
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 HostInstance for ResourceTable
impl HostInstance for ResourceTable
async fn get_module( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, ) -> Result<Resource<Module>>
async fn get_memory( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, memory_index: u32, ) -> Result<Resource<Memory>>
async fn get_global( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, global_index: u32, ) -> Result<Resource<Global>>
async fn get_table( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, table_index: u32, ) -> Result<Resource<Table>>
async fn get_func( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, func_index: u32, ) -> Result<Resource<Func>>
async fn get_tag( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, tag_index: u32, ) -> Result<Resource<Tag>>
async fn clone( &mut self, self_: Resource<Instance>, ) -> Result<Resource<Instance>>
async fn unique_id(&mut self, self_: Resource<Instance>) -> Result<u64>
async fn drop(&mut self, rep: Resource<Instance>) -> Result<()>
Source§impl<_T: HostInstance + ?Sized + Send> HostInstance for &mut _T
impl<_T: HostInstance + ?Sized + Send> HostInstance for &mut _T
Source§fn get_module(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
) -> impl Future<Output = Result<Resource<Module>>> + Send
fn get_module( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, ) -> impl Future<Output = Result<Resource<Module>>> + Send
Get this instance’s module.
Source§fn get_memory(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
memory_index: u32,
) -> impl Future<Output = Result<Resource<Memory>, Error>> + Send
fn get_memory( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, memory_index: u32, ) -> impl Future<Output = Result<Resource<Memory>, Error>> + Send
Get a memory from this instance’s memory index space.
Source§fn get_global(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
global_index: u32,
) -> impl Future<Output = Result<Resource<Global>, Error>> + Send
fn get_global( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, global_index: u32, ) -> impl Future<Output = Result<Resource<Global>, Error>> + Send
Get a global from this instance’s global index space.
Source§fn get_table(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
table_index: u32,
) -> impl Future<Output = Result<Resource<Table>, Error>> + Send
fn get_table( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, table_index: u32, ) -> impl Future<Output = Result<Resource<Table>, Error>> + Send
Get a table from this instance’s table index space.
Source§fn get_func(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
func_index: u32,
) -> impl Future<Output = Result<Resource<WasmFunc>, Error>> + Send
fn get_func( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, func_index: u32, ) -> impl Future<Output = Result<Resource<WasmFunc>, Error>> + Send
Get a function from this instance’s function index space.
Source§fn get_tag(
&mut self,
self_: Resource<Instance>,
d: Resource<Debuggee>,
tag_index: u32,
) -> impl Future<Output = Result<Resource<WasmTag>, Error>> + Send
fn get_tag( &mut self, self_: Resource<Instance>, d: Resource<Debuggee>, tag_index: u32, ) -> impl Future<Output = Result<Resource<WasmTag>, Error>> + Send
Get a tag from this instance’s tag index space.
Source§fn clone(
&mut self,
self_: Resource<Instance>,
) -> impl Future<Output = Result<Resource<Instance>>> + Send
fn clone( &mut self, self_: Resource<Instance>, ) -> impl Future<Output = Result<Resource<Instance>>> + Send
Clone this handle.
Source§fn unique_id(
&mut self,
self_: Resource<Instance>,
) -> impl Future<Output = Result<u64>> + Send
fn unique_id( &mut self, self_: Resource<Instance>, ) -> impl Future<Output = Result<u64>> + Send
Get the unique ID of this instance (within the debuggee) to allow equality and hashing.