WASIComponentStream<T> class final

In-memory runtime state for a Component Model stream<T> value.

This host-side primitive models readable and writable endpoints separately so canonical stream.new, stream.read, stream.write, cancellation, and drop operations can be layered on top without mixing ownership rules into the queue implementation.

Constructors

WASIComponentStream(String name, {int? maxBufferedElements, void onDrop()?, void onReadableDrop()?, void onDiscard(T value)?})
Creates a stream with a debug name.

Properties

hashCode int
The hash code for this object.
no setterinherited
isDropped bool
Whether both endpoints have been dropped.
no setter
maxBufferedElements int?
Maximum queued values before writes apply backpressure.
no setter
name String
Debug label used in diagnostics.
no setter
queuedLength int
Number of queued values waiting to be read.
no setter
readable WASIComponentReadableStream<T>
Readable endpoint.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
writable WASIComponentWritableStream<T>
Writable endpoint.
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited