pub struct LinearReaderOptions {
pub skip_start_magic: bool,
pub skip_end_magic: bool,
pub check_finishes_after_end_magic: bool,
pub emit_chunks: bool,
pub validate_chunk_crcs: bool,
pub prevalidate_chunk_crcs: bool,
pub validate_data_section_crc: bool,
pub validate_summary_section_crc: bool,
pub record_length_limit: Option<usize>,
}Expand description
Options for initializing LinearReader.
Fields§
§skip_start_magic: boolIf true, the reader will not expect the MCAP magic at the start of the stream.
skip_end_magic: boolIf true, the reader will not expect the MCAP magic after the footer record.
check_finishes_after_end_magic: boolIf skip_end_magic is false and this is true, the reader will check that there are no
bytes after the end magic.
emit_chunks: boolIf true, the reader will yield entire chunk records. Otherwise, the reader will decompress and read into chunks, yielding the records inside.
validate_chunk_crcs: boolEnables chunk CRC validation. Ignored if prevalidate_chunk_crcs: true.
prevalidate_chunk_crcs: boolEnables chunk CRC validation before yielding any messages from the chunk. Implies
validate_chunk_crcs: true.
validate_data_section_crc: boolEnables data section CRC validation.
validate_summary_section_crc: boolEnables summary section CRC validation.
record_length_limit: Option<usize>If Some(limit), the reader will return an error on any non-chunk record with length > limit.
If used in conjunction with prevalidate_chunk_crcs, the reader will return an error on any
chunk record where the compressed OR decompressed length are > limit.
Implementations§
Source§impl LinearReaderOptions
impl LinearReaderOptions
pub fn with_skip_start_magic(self, skip_start_magic: bool) -> Self
pub fn with_skip_end_magic(self, skip_end_magic: bool) -> Self
pub fn with_check_finishes_after_end_magic( self, check_finishes_after_end_magic: bool, ) -> Self
pub fn with_emit_chunks(self, emit_chunks: bool) -> Self
pub fn with_validate_chunk_crcs(self, validate_chunk_crcs: bool) -> Self
pub fn with_prevalidate_chunk_crcs(self, prevalidate_chunk_crcs: bool) -> Self
pub fn with_validate_data_section_crc( self, validate_data_section_crc: bool, ) -> Self
pub fn with_validate_summary_section_crc( self, validate_summary_section_crc: bool, ) -> Self
pub fn with_record_length_limit(self, record_length_limit: usize) -> Self
Trait Implementations§
Source§impl Clone for LinearReaderOptions
impl Clone for LinearReaderOptions
Source§fn clone(&self) -> LinearReaderOptions
fn clone(&self) -> LinearReaderOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more