Skip to main content

Crate sim_lib_stream_combinators

Crate sim_lib_stream_combinators 

Source
Expand description

Lazy in-memory stream combinators for STREAM 6.

This crate composes stream-core packet spines without talking to devices, files, or transports. Later Lisp and remote surfaces can lower graph forms into these Rust-level combinators.

Structs§

CellSnapshot
Immutable snapshot of a StreamCell value at a known version.
ClockConvertedStream
A clock-converted stream paired with the diagnostics its conversion emits.
Stream
Cloneable handle to a lazy combinator stream.
StreamCell
Versioned, thread-safe cell holding the latest value of a stream.
StreamRecording
A fully captured stream: its metadata plus every packet it produced.

Enums§

SeekTarget
Where a seek should begin replaying within a recorded stream.

Traits§

StreamNode
Lazy source of stream packets backing a Stream.

Functions§

clock_convert
Rewrites each packet’s ticks via convert, collecting its diagnostics.
event_join_data_kind
Returns the canonical data-packet kind produced by event joins.
event_rate_gate
Bridges an event stream into the control clock domain as a rate gate.
expr_path
Resolves a dotted path of symbol keys through nested map expressions.
fan
Splits source into a Fanout of two readers that each see all packets.
filter
Returns a stream keeping only packets for which pred holds.
filter_data_field_eq
Keeps data packets whose payload field at path equals expected.
filter_data_kind
Returns a stream keeping only data packets whose kind equals kind.
filter_data_kind_stage
Returns a reusable stage form of filter_data_kind.
filter_data_shape
Returns a stream keeping only data packets whose payload matches matches.
filter_data_shape_stage
Returns a reusable stage form of filter_data_shape.
filter_stage
Returns a reusable stage form of filter.
identity
Returns a stage that forwards its source stream unchanged.
jitter_buffer
Reorders packets by clock tick, tolerating up to max_late_packets.
join_data_on_field
Inner-joins two data streams on equal field values.
latency_comp_delay
Records a frames-frame latency-compensation delay over the stream.
map
Returns a stream that applies f to every packet of source.
map_data_expr
Returns a stream that rewrites each data packet’s payload expression with f.
map_data_expr_stage
Returns a reusable stage form of map_data_expr.
map_stage
Returns a reusable stage form of map.
merge
Returns a stream interleaving left and right in pull arrival order.
merge_by_clock
Returns a stream merging left and right ordered by their clock tick.
model_event_data_kind
Returns the canonical data-packet kind for model events.
pipe
Applies a sequence of StreamStage transforms left-to-right to source.
project_data_field
Projects each data payload down to the sub-expression at path.
rank_data_by_i64_field
Reorders recorded data packets by an i64 score read from path.
rank_frontier_data_kind
Returns the canonical data-packet kind for rank-frontier updates.
record_bang
Drains source to done and captures it as a StreamRecording.
record_cassette_bang
Records source to completion and serializes it to a cassette for profile.
record_events
Reconstructs a recording from an arbitrary sequence of kernel events.
record_ledger_run
Reconstructs a recording from all of run’s events in ledger.
record_ledger_slice
Reconstructs a recording from the events of run within seq_range.
redact_data_field
Replaces each data payload’s value at path with redaction.
replay
Returns a fresh stream replaying every packet of recording.
replay_cassette
Rebuilds a replayable stream from a serialized transport cassette.
resample_pcm
Resamples a PCM stream from input_hz to output_hz.
run_bang
Drains stream into kernel events for run, starting at start_seq.
seek
Returns a stream that skips ahead in source to the first packet at target.
stream_cell
Builds a StreamCell holding value at version 0.
stream_window_data_kind
Returns the canonical data-packet kind emitted by window_by_count.
take
Returns a stream that yields at most the first limit packets of source.
take_stage
Returns a reusable stage form of take.
tap
Returns a stream that runs f on each packet as a side effect, unchanged.
tap_diagnostics
Returns a stream that runs f on each diagnostic packet, leaving it intact.
tap_diagnostics_stage
Returns a reusable stage form of tap_diagnostics.
tap_stage
Returns a reusable stage form of tap.
window_by_count
Returns a stream that batches packets into windows of count packets each.
window_by_count_stage
Returns a reusable stage form of window_by_count.

Type Aliases§

StreamStage
A reusable, composable transformation from one Stream to another.