pub trait HostModule: Send {
// Required methods
fn bytecode(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send;
fn add_breakpoint(
&mut self,
self_: Resource<Module>,
d: Resource<Debuggee>,
pc: u32,
) -> impl Future<Output = Result<(), Error>> + Send;
fn remove_breakpoint(
&mut self,
self_: Resource<Module>,
d: Resource<Debuggee>,
pc: u32,
) -> impl Future<Output = Result<(), Error>> + Send;
fn clone(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<Resource<Module>>> + Send;
fn unique_id(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<u64>> + Send;
fn drop(
&mut self,
rep: Resource<Module>,
) -> impl Future<Output = Result<()>> + Send;
}Required Methods§
Sourcefn bytecode(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send
fn bytecode( &mut self, self_: Resource<Module>, ) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send
Get the original Wasm bytecode for this module, if available.
Sourcefn add_breakpoint(
&mut self,
self_: Resource<Module>,
d: Resource<Debuggee>,
pc: u32,
) -> impl Future<Output = Result<(), Error>> + Send
fn add_breakpoint( &mut self, self_: Resource<Module>, d: Resource<Debuggee>, pc: u32, ) -> impl Future<Output = Result<(), Error>> + Send
Add a breakpoint.
Sourcefn remove_breakpoint(
&mut self,
self_: Resource<Module>,
d: Resource<Debuggee>,
pc: u32,
) -> impl Future<Output = Result<(), Error>> + Send
fn remove_breakpoint( &mut self, self_: Resource<Module>, d: Resource<Debuggee>, pc: u32, ) -> impl Future<Output = Result<(), Error>> + Send
Remove a breakpoint.
Sourcefn clone(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<Resource<Module>>> + Send
fn clone( &mut self, self_: Resource<Module>, ) -> impl Future<Output = Result<Resource<Module>>> + Send
Clone this handle.
Sourcefn unique_id(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<u64>> + Send
fn unique_id( &mut self, self_: Resource<Module>, ) -> impl Future<Output = Result<u64>> + Send
Get the unique ID of this module to allow equality and hashing.
fn drop( &mut self, rep: Resource<Module>, ) -> 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 HostModule for ResourceTable
impl HostModule for ResourceTable
async fn add_breakpoint( &mut self, self_: Resource<Module>, d: Resource<Debuggee>, pc: u32, ) -> Result<()>
async fn remove_breakpoint( &mut self, self_: Resource<Module>, d: Resource<Debuggee>, pc: u32, ) -> Result<()>
async fn bytecode(&mut self, self_: Resource<Module>) -> Result<Option<Vec<u8>>>
async fn clone(&mut self, self_: Resource<Module>) -> Result<Resource<Module>>
async fn unique_id(&mut self, self_: Resource<Module>) -> Result<u64>
async fn drop(&mut self, rep: Resource<Module>) -> Result<()>
Source§impl<_T: HostModule + ?Sized + Send> HostModule for &mut _T
impl<_T: HostModule + ?Sized + Send> HostModule for &mut _T
Source§fn bytecode(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send
fn bytecode( &mut self, self_: Resource<Module>, ) -> impl Future<Output = Result<Option<Vec<u8>>>> + Send
Get the original Wasm bytecode for this module, if available.
Source§fn add_breakpoint(
&mut self,
self_: Resource<Module>,
d: Resource<Debuggee>,
pc: u32,
) -> impl Future<Output = Result<(), Error>> + Send
fn add_breakpoint( &mut self, self_: Resource<Module>, d: Resource<Debuggee>, pc: u32, ) -> impl Future<Output = Result<(), Error>> + Send
Add a breakpoint.
Source§fn remove_breakpoint(
&mut self,
self_: Resource<Module>,
d: Resource<Debuggee>,
pc: u32,
) -> impl Future<Output = Result<(), Error>> + Send
fn remove_breakpoint( &mut self, self_: Resource<Module>, d: Resource<Debuggee>, pc: u32, ) -> impl Future<Output = Result<(), Error>> + Send
Remove a breakpoint.
Source§fn clone(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<Resource<Module>>> + Send
fn clone( &mut self, self_: Resource<Module>, ) -> impl Future<Output = Result<Resource<Module>>> + Send
Clone this handle.
Source§fn unique_id(
&mut self,
self_: Resource<Module>,
) -> impl Future<Output = Result<u64>> + Send
fn unique_id( &mut self, self_: Resource<Module>, ) -> impl Future<Output = Result<u64>> + Send
Get the unique ID of this module to allow equality and hashing.