Skip to main content

Get

Enum Get 

Source
pub enum Get {
Show 17 variants Search, SearchBoth, SearchBothRange, First, Last, Next, Prev, NextNoDup, PrevNoDup, Current, SearchGte, SearchRange, SearchLte, FirstDup, LastDup, NextDup, PrevDup,
}
Expand description

Type of get operation for cursors and databases.

Specifies how to position the cursor or which record to retrieve.

Get operation types from the database engine.

Variants§

§

Search

Get the record matching the key.

Searches for a record with the specified key. For duplicate databases, returns the first duplicate.

§

SearchBoth

Get the record matching both key and data.

For duplicate databases, searches for a record matching both the key and the data. Returns an error if not found.

§

SearchBothRange

Get the record matching the key with data >= the specified data.

For duplicate databases, positions the cursor at the first duplicate of the specified key whose data is >= the supplied data slice. Equivalent to BDB-JE’s Cursor.getSearchBothRange.

§

First

Get the record with the smallest key.

Positions the cursor at the first record in the database.

§

Last

Get the record with the largest key.

Positions the cursor at the last record in the database.

§

Next

Get the next record.

Moves the cursor to the next record in key order. For duplicate databases, moves to the next duplicate of the current key, or the first duplicate of the next key if at the last duplicate.

§

Prev

Get the previous record.

Moves the cursor to the previous record in key order. For duplicate databases, moves to the previous duplicate of the current key, or the last duplicate of the previous key if at the first duplicate.

§

NextNoDup

Get the next record with a different key.

Skips all duplicates of the current key and moves to the first duplicate of the next key.

§

PrevNoDup

Get the previous record with a different key.

Skips all duplicates of the current key and moves to the last duplicate of the previous key.

§

Current

Get the current record.

Returns the record at the current cursor position. Useful after positioning the cursor to re-read the record.

§

SearchGte

Get the record with the smallest key greater than or equal to the specified key.

Positions the cursor at the first record with a key greater than or equal to the search key.

Also known as SearchRange (the: Cursor.getSearchKeyRange).

§

SearchRange

Alias for SearchGte. Matches the SEARCH_RANGE/getSearchKeyRange name.

§

SearchLte

Get the record with the largest key less than or equal to the specified key.

Positions the cursor at the last record with a key less than or equal to the search key.

Not yet implemented. Cursor::get returns crate::error::NoxuError::Unsupported for this variant. Tracked for a future sprint; see docs/src/internal/api-audit-2026-05-cursor.md Finding 3.

§

FirstDup

Get the first duplicate of the current key.

For duplicate databases, positions at the first duplicate of the current key. Has no effect if not positioned on a key.

Not yet implemented. Cursor::get returns crate::error::NoxuError::Unsupported for this variant. Tracked for a future sprint; see docs/src/internal/api-audit-2026-05-cursor.md Finding 3.

§

LastDup

Get the last duplicate of the current key.

For duplicate databases, positions at the last duplicate of the current key. Has no effect if not positioned on a key.

Not yet implemented. Cursor::get returns crate::error::NoxuError::Unsupported for this variant. Tracked for a future sprint; see docs/src/internal/api-audit-2026-05-cursor.md Finding 3.

§

NextDup

Get the next duplicate of the current key.

For duplicate databases, moves to the next duplicate of the current key. Returns an error if at the last duplicate.

§

PrevDup

Get the previous duplicate of the current key.

For duplicate databases, moves to the previous duplicate of the current key. Returns an error if at the first duplicate.

Implementations§

Source§

impl Get

Source

pub fn requires_key(&self) -> bool

Returns whether this operation requires a key parameter.

Source

pub fn requires_data(&self) -> bool

Returns whether this operation requires a data parameter.

Source

pub fn requires_duplicates(&self) -> bool

Returns whether this operation is valid only for duplicate databases.

Source

pub fn moves_cursor(&self) -> bool

Returns whether this operation moves the cursor position.

Source

pub fn moves_forward(&self) -> bool

Returns whether this operation moves forward in key order.

Source

pub fn moves_backward(&self) -> bool

Returns whether this operation moves backward in key order.

Trait Implementations§

Source§

impl Clone for Get

Source§

fn clone(&self) -> Get

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 Copy for Get

Source§

impl Debug for Get

Source§

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

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

impl Eq for Get

Source§

impl Hash for Get

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Get

Source§

fn eq(&self, other: &Get) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Get

Auto Trait Implementations§

§

impl Freeze for Get

§

impl RefUnwindSafe for Get

§

impl Send for Get

§

impl Sync for Get

§

impl Unpin for Get

§

impl UnsafeUnpin for Get

§

impl UnwindSafe for Get

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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