pub struct CursorConfig {
pub read_uncommitted: bool,
}Expand description
Configuration for opening a cursor.
Specifies the configuration parameters used to open a cursor on a database.
§Changes in v1.5.1
Four fields that used to live on this struct (read_committed,
non_sticky, evict_ln, prefix_constraint) were removed because
the engine never consulted them. See
docs/src/internal/v1.5-decisions-2026-05.md for the full rationale
and migration notes.
read_committed— to use read-committed isolation, set it on the surroundingcrate::transaction_config::TransactionConfig(it is honoured bycrate::cursor::Cursorvia the txn’s locker) or passcrate::lock_mode::LockMode::ReadCommittedto a per-operationcrate::read_options::ReadOptions.non_sticky— Rust cursors are bound to their owning scope and are not sticky to a transaction in the JE sense; the flag had no observable effect.evict_ln— usecrate::cache_mode::CacheMode::Unchanged/EvictLnon the surroundingDatabaseConfiginstead.prefix_constraint— application code should compare the returned key against its own prefix and stop iterating; the engine’s BIN-level prefix is independent of the user’s range-scan termination condition.
Fields§
§read_uncommitted: boolUse read-uncommitted isolation (dirty reads).
When true, the cursor is opened in read-only mode and skips
read-lock acquisition. This mirrors JE’s
CursorConfig.setReadUncommitted(true) shape and is the only
isolation override consulted at cursor-open time. Per-operation
LockMode overrides (passed via
crate::read_options::ReadOptions) take precedence at the
individual get call.
Implementations§
Source§impl CursorConfig
impl CursorConfig
Sourcepub fn new() -> CursorConfig
pub fn new() -> CursorConfig
Creates a new CursorConfig with default settings.
Sourcepub fn set_read_uncommitted(
&mut self,
read_uncommitted: bool,
) -> &mut CursorConfig
pub fn set_read_uncommitted( &mut self, read_uncommitted: bool, ) -> &mut CursorConfig
Sets read-uncommitted isolation.
Sourcepub fn with_read_uncommitted(self, read_uncommitted: bool) -> CursorConfig
pub fn with_read_uncommitted(self, read_uncommitted: bool) -> CursorConfig
Builder-style method to set read_uncommitted.
Sourcepub fn read_uncommitted() -> CursorConfig
pub fn read_uncommitted() -> CursorConfig
Creates a CursorConfig for read-uncommitted isolation.
Trait Implementations§
Source§impl Clone for CursorConfig
impl Clone for CursorConfig
Source§fn clone(&self) -> CursorConfig
fn clone(&self) -> CursorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CursorConfig
impl Debug for CursorConfig
Source§impl Default for CursorConfig
impl Default for CursorConfig
Source§fn default() -> CursorConfig
fn default() -> CursorConfig
impl Eq for CursorConfig
Source§impl PartialEq for CursorConfig
impl PartialEq for CursorConfig
Source§fn eq(&self, other: &CursorConfig) -> bool
fn eq(&self, other: &CursorConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CursorConfig
Auto Trait Implementations§
impl Freeze for CursorConfig
impl RefUnwindSafe for CursorConfig
impl Send for CursorConfig
impl Sync for CursorConfig
impl Unpin for CursorConfig
impl UnsafeUnpin for CursorConfig
impl UnwindSafe for CursorConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more