StorageIterator

Trait StorageIterator 

Source
pub trait StorageIterator {
    type KeyType<'a>: PartialEq + Eq + PartialOrd + Ord
       where Self: 'a;

    // Required methods
    fn value(&self) -> &[u8] ;
    fn key(&self) -> Self::KeyType<'_>;
    fn is_valid(&self) -> bool;
    fn next(&mut self) -> Result<()>;

    // Provided method
    fn num_active_iterators(&self) -> usize { ... }
}

Required Associated Types§

Source

type KeyType<'a>: PartialEq + Eq + PartialOrd + Ord where Self: 'a

Required Methods§

Source

fn value(&self) -> &[u8]

Get the current value.

Source

fn key(&self) -> Self::KeyType<'_>

Get the current key.

Source

fn is_valid(&self) -> bool

Check if the current iterator is valid.

Source

fn next(&mut self) -> Result<()>

Move to the next position.

Provided Methods§

Source

fn num_active_iterators(&self) -> usize

Number of underlying active iterators for this iterator.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl StorageIterator for LsmIterator

Source§

type KeyType<'a> = &'a [u8]

Source§

impl StorageIterator for MemTableIterator

Source§

type KeyType<'a> = Key<&'a [u8]>

Source§

impl StorageIterator for TxnIterator

Source§

type KeyType<'a> = &'a [u8] where Self: 'a

Source§

impl StorageIterator for TxnLocalIterator

Source§

type KeyType<'a> = &'a [u8]

Source§

impl StorageIterator for SsTableIterator

Source§

type KeyType<'a> = Key<&'a [u8]>

Source§

impl StorageIterator for SstConcatIterator

Source§

type KeyType<'a> = Key<&'a [u8]>

Source§

impl<A: 'static + StorageIterator, B: 'static + for<'a> StorageIterator<KeyType<'a> = A::KeyType<'a>>> StorageIterator for TwoMergeIterator<A, B>

Source§

type KeyType<'a> = <A as StorageIterator>::KeyType<'a>

Source§

impl<I: 'static + for<'a> StorageIterator<KeyType<'a> = KeySlice<'a>>> StorageIterator for MergeIterator<I>

Source§

type KeyType<'a> = Key<&'a [u8]>

Source§

impl<I: StorageIterator> StorageIterator for FusedIterator<I>

Source§

type KeyType<'a> = <I as StorageIterator>::KeyType<'a> where Self: 'a