pub struct Summary<'a> {
    pub stats: Option<Statistics>,
    pub channels: HashMap<u16, Arc<Channel<'a>>>,
    pub schemas: HashMap<u16, Arc<Schema<'a>>>,
    pub chunk_indexes: Vec<ChunkIndex>,
    pub attachment_indexes: Vec<AttachmentIndex>,
    pub metadata_indexes: Vec<MetadataIndex>,
}
Expand description

Indexes of an MCAP file parsed from its (optional) summary section

Fields

stats: Option<Statistics>channels: HashMap<u16, Arc<Channel<'a>>>

Maps channel IDs to their channel

schemas: HashMap<u16, Arc<Schema<'a>>>

Maps schema IDs to their schema

chunk_indexes: Vec<ChunkIndex>attachment_indexes: Vec<AttachmentIndex>metadata_indexes: Vec<MetadataIndex>

Implementations

Read the summary section of the given mapped MCAP file, if it has one.

Stream messages from the chunk with the given index.

To avoid having to read all preceding chunks first, channels and their schemas are pulled from this summary.

Read the mesage indexes for the given indexed chunk.

Channels and their schemas are pulled from this summary. The offsets in each MessageIndexEntry is relative to the decompressed contents of the given chunk.

Seek to the given message in the given indexed chunk.

If you’re interested in more than a single message from the chunk, filtering Summary::stream_chunk is probably a better bet. Compressed chunks aren’t random access - this decompresses everything in the chunk before message.offset and throws it away.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.