Skip to main content

DiskOrderedCursorConfig

Struct DiskOrderedCursorConfig 

Source
pub struct DiskOrderedCursorConfig {
    pub queue_size: usize,
    pub lsn_batch_size: usize,
    pub internal_memory_limit: usize,
    pub keys_only: bool,
    pub bins_only: bool,
    pub count_only: bool,
    pub dedup_keys: bool,
}
Expand description

Configuration for a DiskOrderedCursor.

Mirrors the field set of DiskOrderedCursorConfig but uses Rust-idiomatic builder methods. All fields have sensible defaults matching JE.

Fields§

§queue_size: usize

Maximum number of (key, data) entries the producer thread may queue before blocking.

Default: 1000 (matches JE’s DOS_PRODUCER_QUEUE_SIZE).

§lsn_batch_size: usize

Maximum number of LSNs the producer accumulates before yielding a batch downstream. Currently advisory — the producer streams entries one at a time; this field is preserved for JE shape compatibility and future batched-fetch support.

Default: usize::MAX.

§internal_memory_limit: usize

Maximum number of bytes the in-flight queue may occupy before the producer thread blocks. Approximate — measured as the sum of key + data lengths of buffered entries.

Default: usize::MAX.

§keys_only: bool

If true, only keys are read from the log; data is left empty. Slightly faster because the on-disk LN value bytes are skipped.

Default: false.

§bins_only: bool

JE legacy flag — scan only BIN entries. Honoured as an alias for keys_only in this implementation because Noxu’s log iterator always emits LN payloads (no separate BIN-only scan path is available at this layer).

Default: false.

§count_only: bool

JE legacy flag — count records without materialising key/data. Currently honoured as keys_only plus a discard policy on data. next() still returns one Success per record so the application can compute the count by iterating.

Default: false.

§dedup_keys: bool

Noxu extension. If true, the cursor maintains a HashSet of (db_idx, key) pairs already returned and skips duplicates. This can be expensive on large scans — the set grows linearly with distinct keys. Default false matches JE.

Note: even with dedup_keys = true, the cursor returns the first version of a key that the log scan encounters, which is the oldest version — not the latest. For latest-only semantics the application must run a regular B-tree scan.

Implementations§

Source§

impl DiskOrderedCursorConfig

Source

pub fn new() -> Self

Returns a configuration with default settings.

Source

pub fn with_queue_size(self, queue_size: usize) -> Self

Sets the producer queue size.

Source

pub fn with_lsn_batch_size(self, lsn_batch_size: usize) -> Self

Sets the LSN batch size (advisory).

Source

pub fn with_internal_memory_limit(self, internal_memory_limit: usize) -> Self

Sets the internal memory limit in bytes.

Source

pub fn with_keys_only(self, keys_only: bool) -> Self

Sets keys-only mode (no data is read).

Source

pub fn with_bins_only(self, bins_only: bool) -> Self

Sets BINs-only mode (alias for keys_only in Noxu).

Source

pub fn with_count_only(self, count_only: bool) -> Self

Sets count-only mode.

Source

pub fn with_dedup_keys(self, dedup_keys: bool) -> Self

Enables client-side dedup of repeated keys.

Trait Implementations§

Source§

impl Clone for DiskOrderedCursorConfig

Source§

fn clone(&self) -> DiskOrderedCursorConfig

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 Debug for DiskOrderedCursorConfig

Source§

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

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

impl Default for DiskOrderedCursorConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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