lmdb

Struct RoCursor

Source
pub struct RoCursor<'txn> { /* private fields */ }
Expand description

A read-only cursor for navigating the items within a database.

Trait Implementations§

Source§

impl<'txn> Cursor<'txn> for RoCursor<'txn>

Source§

fn cursor(&self) -> *mut MDB_cursor

Returns a raw pointer to the underlying LMDB cursor. Read more
Source§

fn get( &self, key: Option<&[u8]>, data: Option<&[u8]>, op: c_uint, ) -> Result<(Option<&'txn [u8]>, &'txn [u8])>

Retrieves a key/data pair from the cursor. Depending on the cursor op, the current key may be returned.
Source§

fn iter(&mut self) -> Iter<'txn>

Iterate over database items. The iterator will begin with item next after the cursor, and continue until the end of the database. For new cursors, the iterator will begin with the first item in the database. Read more
Source§

fn iter_start(&mut self) -> Iter<'txn>

Iterate over database items starting from the beginning of the database. Read more
Source§

fn iter_from<K>(&mut self, key: K) -> Iter<'txn>
where K: AsRef<[u8]>,

Iterate over database items starting from the given key. Read more
Source§

fn iter_dup(&mut self) -> IterDup<'txn>

Iterate over duplicate database items. The iterator will begin with the item next after the cursor, and continue until the end of the database. Each item will be returned as an iterator of its duplicates.
Source§

fn iter_dup_start(&mut self) -> IterDup<'txn>

Iterate over duplicate database items starting from the beginning of the database. Each item will be returned as an iterator of its duplicates.
Source§

fn iter_dup_from<K>(&mut self, key: K) -> IterDup<'txn>
where K: AsRef<[u8]>,

Iterate over duplicate items in the database starting from the given key. Each item will be returned as an iterator of its duplicates.
Source§

fn iter_dup_of<K>(&mut self, key: K) -> Iter<'txn>
where K: AsRef<[u8]>,

Iterate over the duplicates of the item in the database with the given key.
Source§

impl<'txn> Debug for RoCursor<'txn>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'txn> Drop for RoCursor<'txn>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'txn> Freeze for RoCursor<'txn>

§

impl<'txn> RefUnwindSafe for RoCursor<'txn>

§

impl<'txn> !Send for RoCursor<'txn>

§

impl<'txn> !Sync for RoCursor<'txn>

§

impl<'txn> Unpin for RoCursor<'txn>

§

impl<'txn> UnwindSafe for RoCursor<'txn>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.