Skip to main content

MeasureRecordsImpl

Trait MeasureRecordsImpl 

Source
pub trait MeasureRecordsImpl: RecordsImpl {
    // Required method
    fn measure_next_record<'a, BV: BufferView<&'a [u8]>>(
        data: &BV,
        context: &mut Self::Context,
    ) -> Result<MeasuredRecord, Self::Error>;
}
Expand description

Implemented for RecordsImpl instances that allow peeking at the length of the first record in the buffer.

Required Methods§

Source

fn measure_next_record<'a, BV: BufferView<&'a [u8]>>( data: &BV, context: &mut Self::Context, ) -> Result<MeasuredRecord, Self::Error>

Returns the length in bytes of the next record.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§