Skip to main content

Module rrd

Module rrd 

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

stream_from_http

Structs§

CrateVersion
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.
DecoderIterator
Iteratively decodes the contents of an arbitrary buffered reader.
DecoderStream
Iteratively decodes the contents of an arbitrary buffered reader.
Encoder
Encode a stream of LogMsg into an .rrd file.
EncodingOptions
FileSink
Stream log messages to an .rrd file.
FileSinkOptions
Configuration for a FileSink.
MessageHeader
NotAnRrdError
When the file does not have the expected .rrd FourCC header.
RawRrdManifest
The payload found in super::RrdFooters.
RrdFooter
This is the payload that is carried in messages of type ::End in RRD streams.
RrdManifest
A pre-validated and parsed RawRrdManifest.
RrdManifestBuilder
Helper to build an RawRrdManifest from Rerun chunks.
RrdManifestSha256
The sha256 hash of an RRD manifest’s payload.
RrdManifestTemporalMapEntry
The individual entries in an RrdManifestTemporalMap.
StreamFooter
The closing frame in an RRD stream. Keeps track of where the RrdFooters can be found.
StreamFooterEntry
One specific entry in the StreamFooter. Each entry corresponds to an RRD footer.
StreamHeader
The opening frame in an RRD stream.

Enums§

CodecError
Possible errors when encoding and decoding RRD data.
Compression
Compression format used.
DecodeError
On failure to decode or serialize a LogMsg.
EncodeError
On failure to encode or serialize a LogMsg.
FileFlushError
An error that can occur when flushing.
FileSinkError
Errors that can occur when creating a FileSink.
MessageKind
OptionsError
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 FourCC for Rerun RRD files.

Traits§

Decodable
Decodes RRD bytes into transport-level types (i.e. Protobuf objects).
DecoderEntrypoint
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§

CodecResult
DecoderApp
A type alias for a Decoder that decodes all the way from raw bytes to application-level types (i.e. even Arrow layers are decoded).
DecoderTransport
A type alias for a Decoder that only decodes from raw bytes up to transport-level types (i.e. Protobuf payloads are decoded, but Arrow data is never touched).
RrdManifestStaticMap
A map based representation of the static data within an RawRrdManifest.
RrdManifestTemporalMap
A map based representation of the temporal data within an RawRrdManifest.