[][src]Struct rocks::transaction_log::TransactionLogIterator

pub struct TransactionLogIterator { /* fields omitted */ }

A TransactionLogIterator is used to iterate over the transactions in a db. One run of the iterator is continuous, i.e. the iterator will stop at the beginning of any gap in sequences

Methods

impl TransactionLogIterator[src]

pub fn is_valid(&self) -> bool[src]

An iterator is either positioned at a WriteBatch or not valid. This method returns true if the iterator is valid. Can read data from a valid iterator.

pub fn move_next(&mut self)[src]

Moves the iterator to the next WriteBatch.

REQUIRES: Valid() to be true.

Rust: avoid name collision with Iterator::next

pub fn status(&self) -> Result<()>[src]

Returns ok if the iterator is valid. Returns the Error when something has gone wrong.

pub fn get_batch(&self) -> BatchResult[src]

If valid return's the current write_batch and the sequence number of the earliest transaction contained in the batch.

ONLY use if Valid() is true and status() is OK.

Trait Implementations

impl Debug for TransactionLogIterator[src]

impl Drop for TransactionLogIterator[src]

impl Iterator for TransactionLogIterator[src]

type Item = BatchResult

The type of the elements being iterated over.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.