pub struct RangeOptions { /* private fields */ }
Expand description

RangeOptions specify how a database range operation is carried out.

There are three parameters for which accessors methods are provided.

  1. Limit restricts the number of key-value pairs returned as part of a range read. A value of zero indicates no limit.

  2. Mode sets the streaming mode of the range read, allowing database to balance latency and bandwidth for this read.

  3. Reverse indicates that the read should be performed lexicographic order (when false) or reverse lexicographic (when true).

    When reverse is true and limit is non-zero, last limit key-value pairs in the range are returned. Ranges in reverse is supported natively by the database should have minimal extra cost.

To create a value of RangeOptions type, use Default::default method. The default value represents - no limit, iterator streaming mode and lexicographic order.

Implementations

Set limit

Get limit

Set streaming mode

Get streaming mode

Set the read order (lexicographic or non-lexicographic)

Get the read order (lexicographic or non-lexicographic)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.