Skip to main content

HostTable

Trait HostTable 

Source
pub trait HostTable: Send {
    // Required methods
    fn len(
        &mut self,
        self_: Resource<Table>,
        d: Resource<Debuggee>,
    ) -> impl Future<Output = Result<u64>> + Send;
    fn get_element(
        &mut self,
        self_: Resource<Table>,
        d: Resource<Debuggee>,
        index: u64,
    ) -> impl Future<Output = Result<Resource<WasmValue>, Error>> + Send;
    fn set_element(
        &mut self,
        self_: Resource<Table>,
        d: Resource<Debuggee>,
        index: u64,
        val: Resource<WasmValue>,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn clone(
        &mut self,
        self_: Resource<Table>,
    ) -> impl Future<Output = Result<Resource<Table>>> + Send;
    fn unique_id(
        &mut self,
        self_: Resource<Table>,
    ) -> impl Future<Output = Result<u64>> + Send;
    fn drop(
        &mut self,
        rep: Resource<Table>,
    ) -> impl Future<Output = Result<()>> + Send;
}

Required Methods§

Source

fn len( &mut self, self_: Resource<Table>, d: Resource<Debuggee>, ) -> impl Future<Output = Result<u64>> + Send

Get the current length of this table, in elements.

Source

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

Get the value at the Nth slot.

Source

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

Set the value at the Nth slot.

Source

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

Clone this handle.

Source

fn unique_id( &mut self, self_: Resource<Table>, ) -> 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<Table>, ) -> 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 HostTable for ResourceTable

Source§

async fn len( &mut self, self_: Resource<Table>, d: Resource<Debuggee>, ) -> Result<u64>

Source§

async fn get_element( &mut self, self_: Resource<Table>, d: Resource<Debuggee>, index: u64, ) -> Result<Resource<WasmValue>>

Source§

async fn set_element( &mut self, self_: Resource<Table>, d: Resource<Debuggee>, index: u64, val: Resource<WasmValue>, ) -> Result<()>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn len( &mut self, self_: Resource<Table>, d: Resource<Debuggee>, ) -> impl Future<Output = Result<u64>> + Send

Get the current length of this table, in elements.

Source§

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

Get the value at the Nth slot.

Source§

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

Set the value at the Nth slot.

Source§

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

Clone this handle.

Source§

fn unique_id( &mut self, self_: Resource<Table>, ) -> 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<Table>) -> Result<()>

Implementors§