Skip to main content

CursorProxy

Enum CursorProxy 

Source
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>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'txn, T: DupTable> DupReadCursor<'txn, T> for CursorProxy<'txn, T>

Source§

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>

Positions the cursor at the last duplicate value for the current key.
Source§

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>>

Positions the cursor at the first duplicate of the next key.
Source§

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>>

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,

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,

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,

Positions the cursor at the first duplicate entry that has a key == key && subkey >= subkey.
Source§

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

Iterates over all duplicates of the given key.
Source§

impl<'txn, T: Table> ReadCursor<'txn, T> for CursorProxy<'txn, T>

Source§

type IntoIter = IntoIterProxy<'txn, T>

Source§

fn first(&mut self) -> Option<Row<T>>

Positions the cursor at the first entry in the table.
Source§

fn last(&mut self) -> Option<Row<T>>

Positions the cursor at the last entry in the table.
Source§

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>>

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>>

Returns the current entry at the cursor position.
Source§

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>>

Positions the cursor at the first entry that has a key >= key. Previously seek_range_key.
Source§

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

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more