Trait tikv::storage::Scanner[][src]

pub trait Scanner: Send {
    fn next(&mut self) -> Result<Option<(Key, Value)>>;
fn met_newer_ts_data(&self) -> NewerTsCheckState;
fn take_statistics(&mut self) -> Statistics; fn scan(
        &mut self,
        limit: usize,
        sample_step: usize
    ) -> Result<Vec<Result<KvPair>>> { ... } }

Scanners allow retrieving items or batches from a scan result.

Commonly they are obtained as a result of a scanner operation.

Required methods

fn next(&mut self) -> Result<Option<(Key, Value)>>[src]

Get the next KvPair if it exists.

fn met_newer_ts_data(&self) -> NewerTsCheckState[src]

Whether there was data > ts during previous scans.

fn take_statistics(&mut self) -> Statistics[src]

Take statistics.

Loading content...

Provided methods

fn scan(
    &mut self,
    limit: usize,
    sample_step: usize
) -> Result<Vec<Result<KvPair>>>
[src]

Get the next KvPairs up to limit if they exist. If sample_step is greater than 0, skips sample_step - 1 number of keys after each returned key.

Loading content...

Implementors

impl Scanner for FixtureStoreScanner[src]

impl<S: Snapshot> Scanner for Scanner<S>[src]

fn take_statistics(&mut self) -> Statistics[src]

Take out and reset the statistics collected so far.

fn met_newer_ts_data(&self) -> NewerTsCheckState[src]

Returns whether data with newer ts is found. The result is meaningful only when check_has_newer_ts_data is set to true.

Loading content...