pub enum CursorProxy<'txn, T: Table> {
Read(MdbxCursor<'txn, RO, T>),
Write(MdbxCursor<'txn, RW, T>),
}Expand description
Proxy to abstract away the transaction kind. This is a read-only cursor.
Variants§
Read(MdbxCursor<'txn, RO, T>)
Write(MdbxCursor<'txn, RW, T>)
Trait Implementations§
Source§impl<T: Table> Clone for CursorProxy<'_, T>
impl<T: Table> Clone for CursorProxy<'_, T>
Source§impl<'txn, T: DupTable> DupReadCursor<'txn, T> for CursorProxy<'txn, T>
impl<'txn, T: DupTable> DupReadCursor<'txn, T> for CursorProxy<'txn, 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, T: Table> ReadCursor<'txn, T> for CursorProxy<'txn, T>
impl<'txn, T: Table> ReadCursor<'txn, T> for CursorProxy<'txn, T>
type IntoIter = IntoIterProxy<'txn, 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 as Table>::Value>
fn set_key(&mut self, key: &T::Key) -> Option<<T as Table>::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, T> Freeze for CursorProxy<'txn, T>
impl<'txn, T> !RefUnwindSafe for CursorProxy<'txn, T>
impl<'txn, T> Send for CursorProxy<'txn, T>where
T: Send,
impl<'txn, T> !Sync for CursorProxy<'txn, T>
impl<'txn, T> Unpin for CursorProxy<'txn, T>where
T: Unpin,
impl<'txn, T> UnsafeUnpin for CursorProxy<'txn, T>
impl<'txn, T> !UnwindSafe for CursorProxy<'txn, 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