Expand description
The stream spine: the runtime-visible stream value and its base combinators.
A StreamValue is the homogeneous stream object the runtime hands around.
It pairs immutable StreamMetadata with one of two internal spines – a
pull spine over a fixed buffer of pre-built items, or a push spine whose
bounded queue is fed by an external producer. Both are driven through one
base combinator surface: next/peek/take/run/cancel/done?/
metadata/stats, exposed both as Rust methods on StreamValue and as
free stream_*_bang verb helpers paired with stream_*_symbol helpers that
name the corresponding kernel Symbol.
The unit of flow is a StreamItem: a StreamPacket plus the clock-
domain Ticks observed at it. The kernel defines the protocol contracts
(Sequence, Object, Event, Symbol); this module supplies the
concrete streaming-fabric behavior over them.
Structs§
- Stream
Event Source - Bridges a
StreamValueto the kernelEventSourcecontract. - Stream
Item - One unit of flow through the spine: a packet plus its clock-domain ticks.
- Stream
Stats - Lifetime counters observed on a stream spine.
- Stream
Value - The runtime-visible stream value: metadata plus a live spine.
Enums§
- Push
Result - Outcome of pushing a single packet into a push stream.
Functions§
- stream_
cancel_ bang stream/cancel!: cancelsstream, discarding any buffered packets.- stream_
cancel_ symbol - The kernel
Symbolnaming thestream/cancel!operation. - stream_
done_ q stream/done?: reports whetherstreamis exhausted.- stream_
done_ symbol - The kernel
Symbolnaming thestream/done?operation. - stream_
metadata stream/metadata: returnsstream’s immutable metadata.- stream_
metadata_ symbol - The kernel
Symbolnaming thestream/metadataoperation. - stream_
next_ bang stream/next!: pulls and consumes the next packet fromstream.- stream_
next_ symbol - The kernel
Symbolnaming thestream/next!operation. - stream_
peek_ bang stream/peek!: returns the next packet ofstreamwithout consuming it.- stream_
peek_ symbol - The kernel
Symbolnaming thestream/peek!operation. - stream_
run_ bang stream/run!: drainsstreaminto sequenced events numbered fromstart_seq.- stream_
run_ symbol - The kernel
Symbolnaming thestream/run!operation. - stream_
stats stream/stats: returns a snapshot ofstream’s lifetime counters.- stream_
stats_ symbol - The kernel
Symbolnaming thestream/statsoperation. - stream_
take stream/take: pulls up tolimitpackets fromstream.- stream_
take_ symbol - The kernel
Symbolnaming thestream/takeoperation.