Struct grebedb::Cursor[][src]

pub struct Cursor<'a> { /* fields omitted */ }

Cursor for navigating key-value pairs in sorted order.

Implementations

impl<'a> Cursor<'a>[src]

pub fn error(&self) -> Option<&Error>[src]

Return the most recent error.

pub fn seek<K>(&mut self, key: K) -> Result<(), Error> where
    K: AsRef<[u8]>, 
[src]

Reposition the cursor at or after the given key.

In other words, the cursor will return key-value pairs that are equal or greater than the given key.

pub fn set_range_end<K>(&mut self, key: Option<K>) where
    K: Into<Vec<u8>>, 
[src]

Set the range of the cursor to those before the given key.

In other words, the cursor will return key-value pairs that are less than the given key.

pub fn next_buf(
    &mut self,
    key: &mut Vec<u8>,
    value: &mut Vec<u8>
) -> Result<bool, Error>
[src]

Advance the cursor forward and write the key-value pair to the given buffer.

Trait Implementations

impl<'a> Debug for Cursor<'a>[src]

impl<'a> Iterator for Cursor<'a>[src]

type Item = KeyValuePair

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Cursor<'a>

impl<'a> Send for Cursor<'a>

impl<'a> Sync for Cursor<'a>

impl<'a> Unpin for Cursor<'a>

impl<'a> !UnwindSafe for Cursor<'a>

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.