Skip to main content

Module spine

Module spine 

Source
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§

StreamEventSource
Bridges a StreamValue to the kernel EventSource contract.
StreamItem
One unit of flow through the spine: a packet plus its clock-domain ticks.
StreamStats
Lifetime counters observed on a stream spine.
StreamValue
The runtime-visible stream value: metadata plus a live spine.

Enums§

PushResult
Outcome of pushing a single packet into a push stream.

Functions§

stream_cancel_bang
stream/cancel!: cancels stream, discarding any buffered packets.
stream_cancel_symbol
The kernel Symbol naming the stream/cancel! operation.
stream_done_q
stream/done?: reports whether stream is exhausted.
stream_done_symbol
The kernel Symbol naming the stream/done? operation.
stream_metadata
stream/metadata: returns stream’s immutable metadata.
stream_metadata_symbol
The kernel Symbol naming the stream/metadata operation.
stream_next_bang
stream/next!: pulls and consumes the next packet from stream.
stream_next_symbol
The kernel Symbol naming the stream/next! operation.
stream_peek_bang
stream/peek!: returns the next packet of stream without consuming it.
stream_peek_symbol
The kernel Symbol naming the stream/peek! operation.
stream_run_bang
stream/run!: drains stream into sequenced events numbered from start_seq.
stream_run_symbol
The kernel Symbol naming the stream/run! operation.
stream_stats
stream/stats: returns a snapshot of stream’s lifetime counters.
stream_stats_symbol
The kernel Symbol naming the stream/stats operation.
stream_take
stream/take: pulls up to limit packets from stream.
stream_take_symbol
The kernel Symbol naming the stream/take operation.