Expand description
Transport-independent Copper log framing and continuous-stream recovery.
The crate owns bounded FEC, pacing, and autonomous recovery repetition above packet transports. The host driver consumes encoded records from existing semantic output workers; runtime ownership handoff stays outside this layer.
Re-exports§
pub use structured::StructuredLogStream;
Modules§
- capture
- Generated selective native codecs. Optional verification runs on output workers.
- feedback
- Optional advisory feedback. All accounting and adaptation run on stream workers. Sender and receiver must be built with matching feedback layouts.
- structured
- Static structured-log fan-out at the local encoder’s byte boundary.
- telemetry
- Bounded ground-side delivery to caller-owned telemetry consumers. Pull-based delivery after native archival, independent of UI processing.
- twin
- Ordered, bounded live replay, independent of archive writes and presentation loss.
Structs§
- Application
Output Schema - Application
Schema - Minimal application schema required to interpret recovered CopperList slots.
- Capture
Archive - Capture-aware native archive. Synthesized payloads never enter this writer. Native CopperList metadata retains both original and captured presence planes; StreamContinuity retains the reconstruction contract and source gaps.
- Continuous
Copper List Sink - Immediate, unpaced CopperList sink backed by continuous RLC.
Generated applications use
scheduled_sinksfor bounded packet scheduling. - Continuous
Decoder - Stateful, bounded RFC 8681 decoder and ordered CopperList assembler.
- Continuous
Encoder - Stateful RFC 8681 encoder for a continuous CopperList lane.
- Continuous
Recovery Stats - Observed delivery and recovery behavior for one continuous stream.
- Continuous
Sender Config - Configuration for the continuous CopperList sender lane.
- Continuous
Sender Stats - Sender-side delivery counters. Transport backpressure is observable but never blocks.
- Copper
List Gap - An inclusive range of unrecoverable CopperList identifiers.
- CuTwin
- Running Copper twin. The separately owned reader can be paused or dropped
without affecting recording.
stop()closes the archive and drains admitted replay; dropping the handle also stops and joins Copper’s workers. - CuTwin
Builder - Builder for a generated application’s live twin. Copper owns all worker, routing, archive, and recovery plumbing; callers supply a packet transport. Receiver bounds match the default 1200-byte-MTU, 64-symbol streaming profile. One handle accepts one sender session, with a fresh archive path.
- CuTwin
Status - Receiver and reconstruction health, available even when the view is paused.
- Decoded
Record - A verified semantic record borrowing its recovered payload.
- Density
Threshold - An RFC 8681 coding-coefficient density threshold in the range
0..=15. - Encoding
Symbol Id - A wrapping RFC 8681 Encoding Symbol ID (ESI).
- Finite
Object Decoder - Bounded assembler for independently reorderable finite RaptorQ objects.
- Finite
Object Encoder - RaptorQ encoder for immutable framed semantic records.
- Finite
Object Limits - Receiver-local limits checked before any RaptorQ decoder is constructed.
- Finite
Object Recovery Stats - Observed finite-object receive behavior.
- Finite
Object Sender Config - Sender policy for one finite-object lane.
- LogStream
Plan - Link and codec policy after RON validation and MTU resolution.
- LogStream
Sender Config - Complete sender configuration for continuous CopperLists and recovery points.
- Native
Archive - One application-typed archive per
(session id, sender id). Pass all ordered router events for that sender toaccept. The expected schema comes fromP’s generated output specs, independently of the remote manifest.CaptureArchiveapplies the generated selective codec for a live twin. A write failure poisons the writer: do not retry a partially committed event. - OneWay
- Static autonomous wiring. There is no feedback polling or capability discovery.
- Pacing
Config - Shared destination budget. Counts complete Copper packets, excluding carrier overhead.
- Received
Manifest - A decoded manifest bound to its verified, immutable wire record.
- Received
Structured Log - One original robot log entry, published only after native archival succeeds.
- Receiver
Limits - Receiver-side bounds for one continuous stream.
- Receiver
Occupancy - Current bounded receiver occupancy, exposed for monitoring and tests.
- Receiver
Requirements - Continuous decoder geometry and record bounds carried by a session manifest. Receiver-local limits still cap admission; sender pacing and repair policy stay local.
- Recovered
Record - One fully assembled and digest-verified semantic record.
- Recovery
Point - A stream restart boundary binding a manifest and a task-state keyframe.
- Recovery
Point Sink - Immediate, unpaced sink emitting keyframes and their recovery points.
Intended for codec tests and custom drivers.
Generated applications use
scheduled_sinksto share a destination budget. - Recovery
Sender Config - Finite-object recovery policy and the canonical manifest record repeated at every recovery point.
- Recovery
Sender Stats - Sender counters for repeated manifests, keyframes, and recovery points.
- Resolved
Continuous Fec - Resolved
Object Fec - RlcConfig
- The active parameters for an RLC encoder or decoder.
- Scheduled
Copper List Sink - Encodes directly into a sender-owned buffer on the existing CL output worker.
- Scheduled
KeyFrame Sink - Bounded keyframe encoding; capture objects are released before pacing begins.
- Scheduled
Structured LogSink - A bounded destination for bytes produced by the local structured-log encoder. It does not own the sender thread: dropping the CL and keyframe sinks still drains and joins that worker, even while the global logger holds this sink.
- Sender
Core - A destination’s single packet scheduler and retained recovery state.
- Sender
Monitor - Final counters remain readable after both output sinks have been dropped.
- Sender
Snapshot - Live worker snapshot. Publication uses try_lock at 10 Hz, never on the RT path.
- Sender
Stats - Counters distinguish queue shedding from carrier backpressure.
- Separate
Feedback - Explicit feedback wiring for separate logical endpoints. The endpoints may be resource handles backed by one carrier; physical out-of-band links are optional.
- Session
Manifest - Control object carrying receiver requirements and application schema checks.
- Session
Router - Discovers sender identities and routes packets using the recovered manifest. Event payloads remain in receiver storage until the callback succeeds.
- Session
Router Limits - Session
Router Stats - Stream
Identity - Identity shared by one sender’s continuous stream.
- Wire
Header - Fixed-endian metadata repeated on every independently reorderable symbol.
- Wire
Packet - Owned packet for callers that retain or edit payloads.
Receiver parsing uses
WirePacketRefto borrow the datagram instead. - Wire
Packet Ref - Structurally validated packet view borrowing the transport’s receive buffer.
Enums§
- Continuous
Receive Event - Ordered output from a continuous receiver.
- CuStream
RxError - Failure to receive one complete logstream packet.
- CuStream
TxError - Failure to submit one complete logstream packet.
- CuTwin
Recording State - Recording state is independent of reconstruction and display consumption.
- Error
- FecScheme
- FecSymbol
Kind - Field
- The finite field used for repair-symbol coefficients.
- GapReason
- Why a range of CopperLists can no longer be reconstructed exactly.
- Lane
- Independently scheduled transport lanes.
- Receive
Error - Separates malformed stream input from a downstream consumer failure.
- Record
Kind - Semantic record families carried by the log stream.
- Resolved
RlcField - Session
Event - Session events borrow receiver storage during delivery. Use
to_ownedonly when an application deliberately needs to retain encoded history.
Constants§
- DEFAULT_
MAX_ SYMBOL_ SIZE - Maximum source-symbol storage used by generated runtime integration.
- DEFAULT_
MAX_ WINDOW_ SYMBOLS - Maximum RLC coding-window storage used by generated runtime integration.
- PACKET_
HEADER_ LEN - Maximum packet header length, used to bound storage and the shared FEC symbol size. RaptorQ uses 51 bytes; RLC uses 32 for source packets and 36 for repair packets.
- RECOVERY_
REPEAT_ INTERVAL - Autonomous repetition period, measured by the sender’s local RobotClock. Repetition is coalesced while the previous transmission is still pending.
Traits§
- CuFeedback
Rx - Optional advisory receive direction. This logical interface may share the physical stream carrier. A shared endpoint must have one receive owner and route complete packet kinds; cloned competing readers cannot provide routing. Protocol decoding, capability negotiation, and feedback policy belong above it.
- CuFeedback
Tx - Optional advisory transmit direction; same atomic, bounded, complete-packet
integrity contract as
CuStreamTx. Acceptance guarantees neither delivery nor ordering. A raw byte stream needs a framing and integrity adapter. - CuStream
Rx - Nonblocking reception of complete logstream packets.
- CuStream
Tx - One-way, fire-and-forget transmission of complete logstream packets.
Functions§
- decode_
copperlist - Decodes one application-typed full or partial CopperList.
- decode_
keyframe - Decodes a complete keyframe payload and rejects trailing bytes.
- decode_
record - Validates and decodes one complete semantic record envelope.
- decode_
recovery_ point - Decodes a complete recovery point payload and rejects trailing bytes.
- encode_
copperlist - Serializes the generated CopperList view selected by its application codec.
- encode_
copperlist_ record_ into - Serializes and frames one CopperList directly into reusable caller-owned storage.
- encode_
keyframe - Encodes a runtime keyframe as its canonical bincode semantic payload.
- encode_
keyframe_ and_ recovery_ point - Creates the separately transportable keyframe and recovery point records.
- encode_
packet_ into - Encodes one packet into caller-owned storage and returns its exact length.
- encode_
record - Frame and digest one semantic payload before FEC is applied.
- encode_
recovery_ point - Encodes a recovery point as its canonical bincode semantic payload.
- new_
session_ id - Creates a process-local session identity without adding configuration or environment inputs.
- scheduled_
feedback_ sinks - Explicitly enable the advisory receive direction; the manifest must advertise it.
- scheduled_
sinks - Start one autonomous worker with an explicitly selected local RobotClock. A real carrier must use a running clock even when application time is mocked. Drops of both sinks stop repetition, then drain at most max_latency in local clock time. No application object, serialization, or wait is added to the RT path.
Type Aliases§
- CuTwin
LogReader - Independent bounded log reader; a stalled reader never delays native recording.
- CuTwin
Reader - Reader for a generated graph’s reconstructed frames and recording status.
- Default
Continuous Copper List Sink - Concrete sender shape emitted by generated applications.
- Result
- Session
Event Ref - A callback-scoped view; retaining it requires an explicit allocating
to_ownedcall.