Skip to main content

HostGlobal

Trait HostGlobal 

Source
pub trait HostGlobal: Send {
    // Required methods
    fn get(
        &mut self,
        self_: Resource<Global>,
        d: Resource<Debuggee>,
    ) -> impl Future<Output = Result<Resource<WasmValue>, Error>> + Send;
    fn set(
        &mut self,
        self_: Resource<Global>,
        d: Resource<Debuggee>,
        val: Resource<WasmValue>,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn clone(
        &mut self,
        self_: Resource<Global>,
    ) -> impl Future<Output = Result<Resource<Global>>> + Send;
    fn unique_id(
        &mut self,
        self_: Resource<Global>,
    ) -> impl Future<Output = Result<u64>> + Send;
    fn drop(
        &mut self,
        rep: Resource<Global>,
    ) -> impl Future<Output = Result<()>> + Send;
}

Required Methods§

Source

fn get( &mut self, self_: Resource<Global>, d: Resource<Debuggee>, ) -> impl Future<Output = Result<Resource<WasmValue>, Error>> + Send

Get the value of this global.

Source

fn set( &mut self, self_: Resource<Global>, d: Resource<Debuggee>, val: Resource<WasmValue>, ) -> impl Future<Output = Result<(), Error>> + Send

Set the value of this global.

Source

fn clone( &mut self, self_: Resource<Global>, ) -> impl Future<Output = Result<Resource<Global>>> + Send

Clone this handle.

Source

fn unique_id( &mut self, self_: Resource<Global>, ) -> impl Future<Output = Result<u64>> + Send

Get the unique ID of this memory to allow equality and hashing.

Source

fn drop( &mut self, rep: Resource<Global>, ) -> 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 HostGlobal for ResourceTable

Source§

async fn get( &mut self, self_: Resource<Global>, d: Resource<Debuggee>, ) -> Result<Resource<WasmValue>>

Source§

async fn set( &mut self, self_: Resource<Global>, d: Resource<Debuggee>, val: Resource<WasmValue>, ) -> Result<()>

Source§

async fn clone(&mut self, self_: Resource<Global>) -> Result<Resource<Global>>

Source§

async fn unique_id(&mut self, self_: Resource<Global>) -> Result<u64>

Source§

async fn drop(&mut self, rep: Resource<Global>) -> Result<()>

Source§

impl<_T: HostGlobal + ?Sized + Send> HostGlobal for &mut _T

Source§

fn get( &mut self, self_: Resource<Global>, d: Resource<Debuggee>, ) -> impl Future<Output = Result<Resource<WasmValue>, Error>> + Send

Get the value of this global.

Source§

fn set( &mut self, self_: Resource<Global>, d: Resource<Debuggee>, val: Resource<WasmValue>, ) -> impl Future<Output = Result<(), Error>> + Send

Set the value of this global.

Source§

fn clone( &mut self, self_: Resource<Global>, ) -> impl Future<Output = Result<Resource<Global>>> + Send

Clone this handle.

Source§

fn unique_id( &mut self, self_: Resource<Global>, ) -> impl Future<Output = Result<u64>> + Send

Get the unique ID of this memory to allow equality and hashing.

Source§

async fn drop(&mut self, rep: Resource<Global>) -> Result<()>

Implementors§