pub trait Iterator: Iterator<Item = (Vec<u8>, Vec<u8>)> {
    // Required methods
    fn set_prefetch(&mut self, prefetch: usize);
    fn is_valid(&self) -> bool;
    fn error(&self) -> &Option<Error>;
    fn rewind(&mut self);
    fn seek(&mut self, key: &[u8]);
    fn get_key(&self) -> &Option<Key>;
    fn get_value(&self) -> &Option<Vec<u8>>;
    fn next(&mut self);
}
Expand description

An MKVS iterator.

Required Methods§

source

fn set_prefetch(&mut self, prefetch: usize)

Sets the number of next elements to prefetch.

source

fn is_valid(&self) -> bool

Return whether the iterator is valid.

source

fn error(&self) -> &Option<Error>

Return the error that occurred during iteration if any.

source

fn rewind(&mut self)

Moves the iterator to the first key in the tree.

source

fn seek(&mut self, key: &[u8])

Moves the iterator either at the given key or at the next larger key.

source

fn get_key(&self) -> &Option<Key>

The key under the iterator.

source

fn get_value(&self) -> &Option<Vec<u8>>

The value under the iterator.

source

fn next(&mut self)

Advance the iterator to the next key.

Implementors§