Trait tantivy_sstable::value::ValueReader

source ·
pub trait ValueReader: Default {
    type Value;

    // Required methods
    fn value(&self, idx: usize) -> &Self::Value;
    fn load(&mut self, data: &[u8]) -> Result<usize>;
}
Expand description

ValueReader is a trait describing the contract of something reading blocks of value, and offering random access within this values.

Required Associated Types§

source

type Value

Type of the value being read.

Required Methods§

source

fn value(&self, idx: usize) -> &Self::Value

Access the value at index idx, in the last block that was read via a call to ValueReader::read.

source

fn load(&mut self, data: &[u8]) -> Result<usize>

Loads a block.

Returns the number of bytes that were read.

Object Safety§

This trait is not object safe.

Implementors§