Skip to main content

RepetitionLevelDecoder

Trait RepetitionLevelDecoder 

Source
pub trait RepetitionLevelDecoder: ColumnLevelDecoder {
    // Required methods
    fn read_rep_levels(
        &mut self,
        out: &mut Self::Buffer,
        num_records: usize,
        num_levels: usize,
    ) -> Result<(usize, usize)>;
    fn skip_rep_levels(
        &mut self,
        num_records: usize,
        num_levels: usize,
    ) -> Result<(usize, usize)>;
    fn flush_partial(&mut self) -> bool;
}

Required Methods§

Source

fn read_rep_levels( &mut self, out: &mut Self::Buffer, num_records: usize, num_levels: usize, ) -> Result<(usize, usize)>

Reads up to num_records records, and at most num_levels levels, of repetition level data into out, returning the number of complete records and levels read.

A record only ends when the data contains a subsequent repetition level of 0; it is therefore left to the caller to delimit the final record in a column.

Source

fn skip_rep_levels( &mut self, num_records: usize, num_levels: usize, ) -> Result<(usize, usize)>

Skips over up to num_levels repetition levels corresponding to num_records records, where a record is delimited by a repetition level of 0.

Returns the number of records skipped, and the number of levels skipped.

A record only ends when the data contains a subsequent repetition level of 0; it is therefore left to the caller to delimit the final record in a column.

Source

fn flush_partial(&mut self) -> bool

Flush any partially read or skipped record.

Returns true if there was such a record, which the caller should count as complete.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§