Struct fdb::range::RangeOptions

source ·
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§

source§

impl RangeOptions

source

pub fn set_limit(&mut self, limit: i32)

Set limit

source

pub fn get_limit(&self) -> i32

Get limit

source

pub fn set_mode(&mut self, mode: StreamingMode)

Set streaming mode

source

pub fn get_mode(&self) -> StreamingMode

Get streaming mode

source

pub fn set_reverse(&mut self, reverse: bool)

Set the read order (lexicographic or non-lexicographic)

source

pub fn get_reverse(&self) -> bool

Get the read order (lexicographic or non-lexicographic)

Trait Implementations§

source§

impl Clone for RangeOptions

source§

fn clone(&self) -> RangeOptions

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for RangeOptions

source§

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

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

impl Default for RangeOptions

source§

fn default() -> RangeOptions

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

impl PartialEq<RangeOptions> for RangeOptions

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for RangeOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.