Skip to main content

HostWasmValue

Trait HostWasmValue 

Source
pub trait HostWasmValue: Send {
Show 15 methods // Required methods fn get_type( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<WasmType>> + Send; fn unwrap_i32( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<u32>> + Send; fn unwrap_i64( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<u64>> + Send; fn unwrap_f32( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<f32>> + Send; fn unwrap_f64( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<f64>> + Send; fn unwrap_v128( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Vec<u8>>> + Send; fn unwrap_func( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Option<Resource<WasmFunc>>>> + Send; fn unwrap_exception( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Option<Resource<WasmException>>>> + Send; fn make_i32( &mut self, value: u32, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send; fn make_i64( &mut self, value: u64, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send; fn make_f32( &mut self, value: f32, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send; fn make_f64( &mut self, value: f64, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send; fn make_v128( &mut self, value: Vec<u8>, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send; fn clone( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send; fn drop( &mut self, rep: Resource<WasmValue>, ) -> impl Future<Output = Result<()>> + Send;
}

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn unwrap_v128( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Vec<u8>>> + Send

Source

fn unwrap_func( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Option<Resource<WasmFunc>>>> + Send

Source

fn unwrap_exception( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Option<Resource<WasmException>>>> + Send

Source

fn make_i32( &mut self, value: u32, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source

fn make_i64( &mut self, value: u64, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source

fn make_f32( &mut self, value: f32, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source

fn make_f64( &mut self, value: f64, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source

fn make_v128( &mut self, value: Vec<u8>, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source

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

Source

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

Source§

async fn get_type(&mut self, self_: Resource<WasmValue>) -> Result<WasmType>

Source§

async fn unwrap_i32(&mut self, self_: Resource<WasmValue>) -> Result<u32>

Source§

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

Source§

async fn unwrap_f32(&mut self, self_: Resource<WasmValue>) -> Result<f32>

Source§

async fn unwrap_f64(&mut self, self_: Resource<WasmValue>) -> Result<f64>

Source§

async fn unwrap_v128(&mut self, self_: Resource<WasmValue>) -> Result<Vec<u8>>

Source§

async fn unwrap_func( &mut self, self_: Resource<WasmValue>, ) -> Result<Option<Resource<Func>>>

Source§

async fn unwrap_exception( &mut self, self_: Resource<WasmValue>, ) -> Result<Option<Resource<WasmException>>>

Source§

async fn make_i32(&mut self, value: u32) -> Result<Resource<WasmValue>>

Source§

async fn make_i64(&mut self, value: u64) -> Result<Resource<WasmValue>>

Source§

async fn make_f32(&mut self, value: f32) -> Result<Resource<WasmValue>>

Source§

async fn make_f64(&mut self, value: f64) -> Result<Resource<WasmValue>>

Source§

async fn make_v128(&mut self, value: Vec<u8>) -> Result<Resource<WasmValue>>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unwrap_v128( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Vec<u8>>> + Send

Source§

fn unwrap_func( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Option<Resource<WasmFunc>>>> + Send

Source§

fn unwrap_exception( &mut self, self_: Resource<WasmValue>, ) -> impl Future<Output = Result<Option<Resource<WasmException>>>> + Send

Source§

fn make_i32( &mut self, value: u32, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source§

fn make_i64( &mut self, value: u64, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source§

fn make_f32( &mut self, value: f32, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source§

fn make_f64( &mut self, value: f64, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source§

fn make_v128( &mut self, value: Vec<u8>, ) -> impl Future<Output = Result<Resource<WasmValue>>> + Send

Source§

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

Source§

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

Implementors§