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§
Sourcefn read_rep_levels(
&mut self,
out: &mut Self::Buffer,
num_records: usize,
num_levels: usize,
) -> Result<(usize, usize)>
fn read_rep_levels( &mut self, out: &mut Self::Buffer, num_records: usize, num_levels: usize, ) -> Result<(usize, usize)>
Read up to max_records
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
§Panics
Implementations may panic if range
overlaps with already written data
Sourcefn skip_rep_levels(
&mut self,
num_records: usize,
num_levels: usize,
) -> Result<(usize, usize)>
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
Sourcefn flush_partial(&mut self) -> bool
fn flush_partial(&mut self) -> bool
Flush any partially read or skipped record