Struct sstable::TableIterator

source ·
pub struct TableIterator { /* private fields */ }
Expand description

This iterator is a “TwoLevelIterator”; it uses an index block in order to get an offset hint into the data blocks.

Trait Implementations§

source§

impl SSIterator for TableIterator

source§

fn advance(&mut self) -> bool

Advances the position of the iterator by one element (which can be retrieved using current(). If no more elements are available, advance() returns false, and the iterator becomes invalid (i.e. as if reset() had been called).
source§

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

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

fn prev(&mut self) -> bool

Go to the previous item; if the iterator is moved beyond the first element, prev() returns false and it will be !valid(). This is inefficient for most iterator implementations.
source§

fn reset(&mut self)

Resets the iterator to be !valid(), i.e. positioned before the first element.
source§

fn valid(&self) -> bool

Returns true if the iterator is not positioned before the first or after the last element, i.e. if current() would succeed.
source§

fn current(&self, key: &mut Vec<u8>, val: &mut Vec<u8>) -> bool

Return the current item (i.e. the item most recently returned by next()).
source§

fn current_key(&self) -> Option<&[u8]>

Return a reference to the key of the current item (i.e. the item most recently returned by next()).
source§

fn next(&mut self) -> Option<(Vec<u8>, Vec<u8>)>

next is like Iterator::next(). It’s implemented here because Rust disallows implementing a foreign trait for any type, thus we can’t do impl<T: SSIterator> Iterator<Item=Vec<u8>> for T {}.
source§

fn seek_to_first(&mut self)

seek_to_first seeks to the first element.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.