Trait sstable::iterator::SSIterator [] [src]

pub trait SSIterator: Iterator {
    fn seek(&mut self, key: &[u8]);
    fn reset(&mut self);
    fn valid(&self) -> bool;
    fn current(&self) -> Option<Self::Item>;
    fn prev(&mut self) -> Option<Self::Item>;

    fn seek_to_first(&mut self) { ... }
}

An extension of the standard Iterator trait that supports some methods necessary for LevelDB. This works because the iterators used are stateful and keep the last returned element.

Note: Implementing types are expected to hold !valid() before the first call to next().

Required Methods

Seek the iterator to key or the next bigger key. If the seek is invalid (past last element), the iterator is reset() and not valid.

Resets the iterator to be !valid() again (before first element)

Returns true if current() would return a valid item.

Return the current item.

Go to the previous item.

Provided Methods

Implementors