pub struct MdbxCursor<'txn, K: TransactionKind, T: Table> { /* private fields */ }Expand description
A cursor for navigating the entries within a table. Wraps the libmdbx cursor so that we only expose our own methods.
Trait Implementations§
Source§impl<Kind: TransactionKind, T: Table> Clone for MdbxCursor<'_, Kind, T>
impl<Kind: TransactionKind, T: Table> Clone for MdbxCursor<'_, Kind, T>
Source§impl<'txn, Kind: TransactionKind, T: DupTable> DupReadCursor<'txn, T> for MdbxCursor<'txn, Kind, T>
impl<'txn, Kind: TransactionKind, T: DupTable> DupReadCursor<'txn, T> for MdbxCursor<'txn, Kind, T>
Source§fn first_duplicate(&mut self) -> Option<T::Value>
fn first_duplicate(&mut self) -> Option<T::Value>
Positions the cursor at the first duplicate value for the current key.
Source§fn last_duplicate(&mut self) -> Option<T::Value>
fn last_duplicate(&mut self) -> Option<T::Value>
Positions the cursor at the last duplicate value for the current key.
Source§fn next_duplicate(&mut self) -> Option<Row<T>>
fn next_duplicate(&mut self) -> Option<Row<T>>
Positions the cursor at the next duplicate value for the current key.
This does not jump keys.
Source§fn next_no_duplicate(&mut self) -> Option<Row<T>>
fn next_no_duplicate(&mut self) -> Option<Row<T>>
Positions the cursor at the first duplicate of the next key.
Source§fn prev_duplicate(&mut self) -> Option<Row<T>>
fn prev_duplicate(&mut self) -> Option<Row<T>>
Positions the cursor at the previous duplicate value for the current key.
Source§fn prev_no_duplicate(&mut self) -> Option<Row<T>>
fn prev_no_duplicate(&mut self) -> Option<Row<T>>
Positions the cursor at the last duplicate of the previous key.
Source§fn set_subkey(
&mut self,
key: &T::Key,
subkey: &DupSubKey<T>,
) -> Option<T::Value>where
T::Value: DupTableValue,
fn set_subkey(
&mut self,
key: &T::Key,
subkey: &DupSubKey<T>,
) -> Option<T::Value>where
T::Value: DupTableValue,
Positions the cursor at the entry with a given key and subkey.
Source§fn set_lowerbound_both(
&mut self,
key: &T::Key,
subkey: &DupSubKey<T>,
) -> Option<Row<T>>where
T::Value: DupTableValue,
fn set_lowerbound_both(
&mut self,
key: &T::Key,
subkey: &DupSubKey<T>,
) -> Option<Row<T>>where
T::Value: DupTableValue,
Positions the cursor at the first duplicate entry that has a key >=
key && subkey >= subkey.Source§fn set_lowerbound_subkey(
&mut self,
key: &T::Key,
subkey: &DupSubKey<T>,
) -> Option<T::Value>where
T::Value: DupTableValue,
fn set_lowerbound_subkey(
&mut self,
key: &T::Key,
subkey: &DupSubKey<T>,
) -> Option<T::Value>where
T::Value: DupTableValue,
Positions the cursor at the first duplicate entry that has a key ==
key && subkey >= subkey.Source§fn count_duplicates(&mut self) -> usize
fn count_duplicates(&mut self) -> usize
Counts the number of duplicates (linear operation!).
Source§fn into_iter_dup_of(self, key: &T::Key) -> Self::IntoIter
fn into_iter_dup_of(self, key: &T::Key) -> Self::IntoIter
Iterates over all duplicates of the given key.
Source§impl<'txn, Kind: TransactionKind, T: Table> ReadCursor<'txn, T> for MdbxCursor<'txn, Kind, T>
impl<'txn, Kind: TransactionKind, T: Table> ReadCursor<'txn, T> for MdbxCursor<'txn, Kind, T>
type IntoIter = IntoIter<'txn, Kind, T>
Source§fn next(&mut self) -> Option<Row<T>>
fn next(&mut self) -> Option<Row<T>>
Positions the cursor at the next entry in the table.
For a
DupTable, this can be either the next duplicate for the current key
or the first duplicate for the next key.Source§fn prev(&mut self) -> Option<Row<T>>
fn prev(&mut self) -> Option<Row<T>>
Positions the cursor at the previous entry in the table.
For a
DupTable, this can be either the next duplicate for the current key
or the first duplicate for the next key.Source§fn get_current(&mut self) -> Option<Row<T>>
fn get_current(&mut self) -> Option<Row<T>>
Returns the current entry at the cursor position.
Source§fn set_key(&mut self, key: &T::Key) -> Option<T::Value>
fn set_key(&mut self, key: &T::Key) -> Option<T::Value>
Positions the cursor at the entry that has a key ==
key.
Previously seek_key.Source§fn set_lowerbound_key(&mut self, key: &T::Key) -> Option<Row<T>>
fn set_lowerbound_key(&mut self, key: &T::Key) -> Option<Row<T>>
Positions the cursor at the first entry that has a key >=
key.
Previously seek_range_key.Source§fn into_iter_start(self) -> Self::IntoIter
fn into_iter_start(self) -> Self::IntoIter
Iterates over all entries in the table.
Source§fn into_iter_from(self, key: &T::Key) -> Self::IntoIter
fn into_iter_from(self, key: &T::Key) -> Self::IntoIter
Iterates over all entries in the table starting from a given key.
Auto Trait Implementations§
impl<'txn, K, T> Freeze for MdbxCursor<'txn, K, T>
impl<'txn, K, T> !RefUnwindSafe for MdbxCursor<'txn, K, T>
impl<'txn, K, T> Send for MdbxCursor<'txn, K, T>where
T: Send,
impl<'txn, K, T> !Sync for MdbxCursor<'txn, K, T>
impl<'txn, K, T> Unpin for MdbxCursor<'txn, K, T>where
T: Unpin,
impl<'txn, K, T> UnsafeUnpin for MdbxCursor<'txn, K, T>
impl<'txn, K, T> !UnwindSafe for MdbxCursor<'txn, K, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more