Expand description
Everything needed to encode/decode and serialize/deserialize RRD streams.
⚠️Make sure to familiarize yourself with the crate-level docs first. ⚠️
RRD streams are used everywhere gRPC isn’t: files, standard I/O, HTTP fetches, importers, etc. This module is completely unrelated to the Rerun Data Protocol (Redap) gRPC API. This module is also completely unrelated to the legacy SDK comms gRPC API.
§Encodable/Decodable vs. Encoder/Decoder
The Encodable/Decodable traits specify how transport-level types should be encoded to
and decoded from top-level RRD types, respectively. Only transport-level types can be encoded/decoded.
That is all these traits do. They do not perform any kind of IO, they do not keep track of any
sort of state. That’s the job of the Encoder and Decoder: they provide the IO and the
state machines that turn collections of Encodables and Decodables into actual RRD streams.
Modules§
Structs§
- Crate
Version - The version of a Rerun crate.
- Decoder
- A push-based state machine that ingests byte chunks and outputs messages once it has enough data to decode one.
- Decoder
Iterator - Iteratively decodes the contents of an arbitrary buffered reader.
- Decoder
Stream - Iteratively decodes the contents of an arbitrary buffered reader.
- Encoder
- Encode a stream of
LogMsginto an.rrdfile. - Encoding
Options - File
Sink - Stream log messages to an
.rrdfile. - File
Sink Options - Configuration for a
FileSink. - Message
Header - NotAn
RrdError - When the file does not have the expected .rrd FourCC header.
- RawRrd
Manifest - The payload found in
super::RrdFooters. - RrdFooter
- This is the payload that is carried in messages of type
::Endin RRD streams. - RrdManifest
- A pre-validated and parsed
RawRrdManifest. - RrdManifest
Builder - Helper to build an
RawRrdManifestfrom Rerun chunks. - RrdManifest
Sha256 - The sha256 hash of an RRD manifest’s payload.
- RrdManifest
Temporal MapEntry - The individual entries in an
RrdManifestTemporalMap. - Stream
Footer - The closing frame in an RRD stream. Keeps track of where the
RrdFooters can be found. - Stream
Footer Entry - One specific entry in the
StreamFooter. Each entry corresponds to an RRD footer. - Stream
Header - The opening frame in an RRD stream.
Enums§
- Codec
Error - Possible errors when encoding and decoding RRD data.
- Compression
- Compression format used.
- Decode
Error - On failure to decode or serialize a
LogMsg. - Encode
Error - On failure to encode or serialize a
LogMsg. - File
Flush Error - An error that can occur when flushing.
- File
Sink Error - Errors that can occur when creating a
FileSink. - Message
Kind - Options
Error - On failure to decode
crate::rrd::EncodingOptions - Serializer
- How we serialize the data.
Constants§
- OLD_
RRD_ FOURCC - Previously used
FourCCs for Rerun RRD files. - RRD_
FOURCC - The currently used
FourCCfor Rerun RRD files.
Traits§
- Decodable
- Decodes RRD bytes into transport-level types (i.e. Protobuf objects).
- Decoder
Entrypoint - Implemented for top-level types that can kickoff decoding.
- Encodable
- Encodes transport-level types (i.e. Protobuf objects) into RRD bytes.
Functions§
- enumerate_
rrd_ stores - Enumerate all
StoreIds present in an RRD file, without reading chunk data. - read_
chunks - Read chunks from an open RRD file by their IDs, using byte offsets from the manifest.
- read_
rrd_ footer - Read the full RRD footer from an open file using seek-based I/O.
Type Aliases§
- Codec
Result - Decoder
App - A type alias for a
Decoderthat decodes all the way from raw bytes to application-level types (i.e. even Arrow layers are decoded). - Decoder
Transport - A type alias for a
Decoderthat only decodes from raw bytes up to transport-level types (i.e. Protobuf payloads are decoded, but Arrow data is never touched). - RrdManifest
Static Map - A map based representation of the static data within an
RawRrdManifest. - RrdManifest
Temporal Map - A map based representation of the temporal data within an
RawRrdManifest.