WASIComponentAsyncHost class final
Binds decoded canonical stream/future definitions to executable primitives.
This host layer binds validated stream.* and future.* definitions to
typed Dart endpoint primitives, including primitive, owned-resource-handle,
composite, and dynamic string/list stream/future memory copies.
Constructors
- WASIComponentAsyncHost({WASIComponentResourceTable? table, WASIComponentBackpressure? backpressure})
-
Creates an async host backed by
tableor a new resource table.
Properties
- backpressure → WASIComponentBackpressure
-
Shared Component Model async backpressure state.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- table → WASIComponentResourceTable
-
Resource table used for handle-backed stream/future endpoints.
final
Methods
-
bindCanonicalDefinition(
WasmComponentCanonicalDefinition definition) → WASIComponentCanonicalAsyncOperation - Binds a decoded canonical stream/future definition.
-
bindCanonicalDefinitions(
WasmComponent component) → WASIComponentCanonicalAsyncProgram -
Binds all decoded canonical stream/future definitions in
component. -
bindCanonicalDefinitionsToHandles(
WasmComponent component) → WASIComponentCanonicalAsyncHandleProgram - Binds all decoded canonical stream/future definitions to integer handles.
-
checkAsyncValueBindingsAvailable(
Iterable< WASIComponentAsyncValueBinding> bindings) → void -
Throws if
bindingscannot be defined without mutating this host. -
componentAsyncValueBindings(
WasmComponent component) → List< WASIComponentAsyncValueBinding> - Returns supported component stream/future bindings in type-index order.
-
defineAsyncValueBindings<
T> (Iterable< WASIComponentAsyncValueBinding> bindings, {String nameForBinding(WASIComponentAsyncValueBinding binding)?, int? maxBufferedElementsForStream(WASIComponentAsyncValueBinding binding)?, void onDrop(WASIComponentAsyncValueBinding binding)?, void onDiscard(WASIComponentAsyncValueBinding binding, T value)?}) → void - Defines async value types from a prepared component async binding list.
-
defineFutureType<
T> (int componentTypeIndex, String name, {void onDrop()?, void onDiscard(T value)?}) → void -
Defines a component
future<T>type forcomponentTypeIndex. -
defineFutureTypeFromComponent<
T> (WasmComponent component, int componentTypeIndex, String name, {void onDrop()?, void onDiscard(T value)?}) → void -
Defines a component
future<T>type from a decoded component type. -
defineStreamType<
T> (int componentTypeIndex, String name, {int? maxBufferedElements, void onDrop()?, void onDiscard(T value)?}) → void -
Defines a component
stream<T>type forcomponentTypeIndex. -
defineStreamTypeFromComponent<
T> (WasmComponent component, int componentTypeIndex, String name, {int? maxBufferedElements, void onDrop()?, void onDiscard(T value)?}) → void -
Defines a component
stream<T>type from a decoded component type. -
liftReadableEndpoint(
int componentTypeIndex, int handle) → Object - Lifts a canonical stream or future handle by transferring its endpoint out of the component resource table.
-
lowerReadableEndpoint(
int componentTypeIndex, Object value) → int - Lowers a host stream or future readable endpoint to a canonical handle.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
waitableForHandle(
int handle) → WASIComponentWaitable? - Resolves a handle-backed async endpoint to its waitable state.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited