Trait VMComponentAsyncStore

Source
pub unsafe trait VMComponentAsyncStore {
Show 32 methods // Required methods fn backpressure_set( &mut self, caller_instance: RuntimeComponentInstanceIndex, enabled: u32, ) -> Result<()>; fn task_return( &mut self, instance: &mut ComponentInstance, ty: TypeTupleIndex, storage: *mut ValRaw, storage_len: usize, ) -> Result<()>; fn waitable_set_new( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, ) -> Result<u32>; fn waitable_set_wait( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, async_: bool, memory: *mut VMMemoryDefinition, payload: u32, ) -> Result<u32>; fn waitable_set_poll( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, async_: bool, memory: *mut VMMemoryDefinition, payload: u32, ) -> Result<u32>; fn waitable_set_drop( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, ) -> Result<()>; fn waitable_join( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, waitable: u32, ) -> Result<()>; fn yield_( &mut self, instance: &mut ComponentInstance, async_: bool, ) -> Result<()>; fn subtask_drop( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, task_id: u32, ) -> Result<()>; fn sync_enter( &mut self, start: *mut VMFuncRef, return_: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, task_return_type: TypeTupleIndex, result_count: u32, storage: *mut ValRaw, storage_len: usize, ) -> Result<()>; fn sync_exit( &mut self, instance: &mut ComponentInstance, callback: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, callee: *mut VMFuncRef, callee_instance: RuntimeComponentInstanceIndex, param_count: u32, storage: *mut MaybeUninit<ValRaw>, storage_len: usize, ) -> Result<()>; fn async_enter( &mut self, start: *mut VMFuncRef, return_: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, task_return_type: TypeTupleIndex, params: u32, results: u32, ) -> Result<()>; fn async_exit( &mut self, instance: &mut ComponentInstance, callback: *mut VMFuncRef, post_return: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, callee: *mut VMFuncRef, callee_instance: RuntimeComponentInstanceIndex, param_count: u32, result_count: u32, flags: u32, ) -> Result<u32>; fn future_new( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, ) -> Result<u32>; fn future_write( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeFutureTableIndex, future: u32, address: u32, ) -> Result<u32>; fn future_read( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeFutureTableIndex, future: u32, address: u32, ) -> Result<u32>; fn future_cancel_write( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, async_: bool, writer: u32, ) -> Result<u32>; fn future_cancel_read( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, async_: bool, reader: u32, ) -> Result<u32>; fn future_close_writable( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, writer: u32, ) -> Result<()>; fn future_close_readable( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, reader: u32, ) -> Result<()>; fn stream_new( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, ) -> Result<u32>; fn stream_write( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeStreamTableIndex, stream: u32, address: u32, count: u32, ) -> Result<u32>; fn stream_read( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeStreamTableIndex, stream: u32, address: u32, count: u32, ) -> Result<u32>; fn stream_cancel_write( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, async_: bool, writer: u32, ) -> Result<u32>; fn stream_cancel_read( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, async_: bool, reader: u32, ) -> Result<u32>; fn stream_close_writable( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, writer: u32, ) -> Result<()>; fn stream_close_readable( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, reader: u32, ) -> Result<()>; fn flat_stream_write( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, ty: TypeStreamTableIndex, payload_size: u32, payload_align: u32, stream: u32, address: u32, count: u32, ) -> Result<u32>; fn flat_stream_read( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, ty: TypeStreamTableIndex, payload_size: u32, payload_align: u32, stream: u32, address: u32, count: u32, ) -> Result<u32>; fn error_context_new( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeComponentLocalErrorContextTableIndex, debug_msg_address: u32, debug_msg_len: u32, ) -> Result<u32>; fn error_context_debug_message( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeComponentLocalErrorContextTableIndex, err_ctx_handle: u32, debug_msg_address: u32, ) -> Result<()>; fn error_context_drop( &mut self, instance: &mut ComponentInstance, ty: TypeComponentLocalErrorContextTableIndex, err_ctx_handle: u32, ) -> Result<()>;
}
Available on crate features runtime and component-model and component-model-async only.
Expand description

Trait representing component model ABI async intrinsics and fused adapter helper functions.

Required Methods§

Source

fn backpressure_set( &mut self, caller_instance: RuntimeComponentInstanceIndex, enabled: u32, ) -> Result<()>

The backpressure.set intrinsic.

Source

fn task_return( &mut self, instance: &mut ComponentInstance, ty: TypeTupleIndex, storage: *mut ValRaw, storage_len: usize, ) -> Result<()>

The task.return intrinsic.

Source

fn waitable_set_new( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, ) -> Result<u32>

The waitable-set.new intrinsic.

Source

fn waitable_set_wait( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, async_: bool, memory: *mut VMMemoryDefinition, payload: u32, ) -> Result<u32>

The waitable-set.wait intrinsic.

Source

fn waitable_set_poll( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, async_: bool, memory: *mut VMMemoryDefinition, payload: u32, ) -> Result<u32>

The waitable-set.poll intrinsic.

Source

fn waitable_set_drop( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, ) -> Result<()>

The waitable-set.drop intrinsic.

Source

fn waitable_join( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, set: u32, waitable: u32, ) -> Result<()>

The waitable.join intrinsic.

Source

fn yield_( &mut self, instance: &mut ComponentInstance, async_: bool, ) -> Result<()>

The yield intrinsic.

Source

fn subtask_drop( &mut self, instance: &mut ComponentInstance, caller_instance: RuntimeComponentInstanceIndex, task_id: u32, ) -> Result<()>

The subtask.drop intrinsic.

Source

fn sync_enter( &mut self, start: *mut VMFuncRef, return_: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, task_return_type: TypeTupleIndex, result_count: u32, storage: *mut ValRaw, storage_len: usize, ) -> Result<()>

A helper function for fused adapter modules involving calls where the caller is sync-lowered but the callee is async-lifted.

Source

fn sync_exit( &mut self, instance: &mut ComponentInstance, callback: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, callee: *mut VMFuncRef, callee_instance: RuntimeComponentInstanceIndex, param_count: u32, storage: *mut MaybeUninit<ValRaw>, storage_len: usize, ) -> Result<()>

A helper function for fused adapter modules involving calls where the caller is sync-lowered but the callee is async-lifted.

Source

fn async_enter( &mut self, start: *mut VMFuncRef, return_: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, task_return_type: TypeTupleIndex, params: u32, results: u32, ) -> Result<()>

A helper function for fused adapter modules involving calls where the caller is async-lowered.

Source

fn async_exit( &mut self, instance: &mut ComponentInstance, callback: *mut VMFuncRef, post_return: *mut VMFuncRef, caller_instance: RuntimeComponentInstanceIndex, callee: *mut VMFuncRef, callee_instance: RuntimeComponentInstanceIndex, param_count: u32, result_count: u32, flags: u32, ) -> Result<u32>

A helper function for fused adapter modules involving calls where the caller is async-lowered.

Source

fn future_new( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, ) -> Result<u32>

The future.new intrinsic.

Source

fn future_write( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeFutureTableIndex, future: u32, address: u32, ) -> Result<u32>

The future.write intrinsic.

Source

fn future_read( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeFutureTableIndex, future: u32, address: u32, ) -> Result<u32>

The future.read intrinsic.

Source

fn future_cancel_write( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, async_: bool, writer: u32, ) -> Result<u32>

The future.cancel-write intrinsic.

Source

fn future_cancel_read( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, async_: bool, reader: u32, ) -> Result<u32>

The future.cancel-read intrinsic.

Source

fn future_close_writable( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, writer: u32, ) -> Result<()>

The future.close-writable intrinsic.

Source

fn future_close_readable( &mut self, instance: &mut ComponentInstance, ty: TypeFutureTableIndex, reader: u32, ) -> Result<()>

The future.close-readable intrinsic.

Source

fn stream_new( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, ) -> Result<u32>

The stream.new intrinsic.

Source

fn stream_write( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeStreamTableIndex, stream: u32, address: u32, count: u32, ) -> Result<u32>

The stream.write intrinsic.

Source

fn stream_read( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeStreamTableIndex, stream: u32, address: u32, count: u32, ) -> Result<u32>

The stream.read intrinsic.

Source

fn stream_cancel_write( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, async_: bool, writer: u32, ) -> Result<u32>

The stream.cancel-write intrinsic.

Source

fn stream_cancel_read( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, async_: bool, reader: u32, ) -> Result<u32>

The stream.cancel-read intrinsic.

Source

fn stream_close_writable( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, writer: u32, ) -> Result<()>

The stream.close-writable intrinsic.

Source

fn stream_close_readable( &mut self, instance: &mut ComponentInstance, ty: TypeStreamTableIndex, reader: u32, ) -> Result<()>

The stream.close-readable intrinsic.

Source

fn flat_stream_write( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, ty: TypeStreamTableIndex, payload_size: u32, payload_align: u32, stream: u32, address: u32, count: u32, ) -> Result<u32>

The “fast-path” implementation of the stream.write intrinsic for “flat” (i.e. memcpy-able) payloads.

Source

fn flat_stream_read( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, ty: TypeStreamTableIndex, payload_size: u32, payload_align: u32, stream: u32, address: u32, count: u32, ) -> Result<u32>

The “fast-path” implementation of the stream.read intrinsic for “flat” (i.e. memcpy-able) payloads.

Source

fn error_context_new( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeComponentLocalErrorContextTableIndex, debug_msg_address: u32, debug_msg_len: u32, ) -> Result<u32>

The error-context.new intrinsic.

Source

fn error_context_debug_message( &mut self, instance: &mut ComponentInstance, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, string_encoding: u8, ty: TypeComponentLocalErrorContextTableIndex, err_ctx_handle: u32, debug_msg_address: u32, ) -> Result<()>

The error-context.debug-message intrinsic.

Source

fn error_context_drop( &mut self, instance: &mut ComponentInstance, ty: TypeComponentLocalErrorContextTableIndex, err_ctx_handle: u32, ) -> Result<()>

The error-context.drop intrinsic.

Implementors§