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.
-
Limit restricts the number of key-value pairs returned as part of a range read. A value of zero indicates no limit.
-
Mode sets the streaming mode of the range read, allowing database to balance latency and bandwidth for this read.
-
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
impl RangeOptions
sourcepub fn set_mode(&mut self, mode: StreamingMode)
pub fn set_mode(&mut self, mode: StreamingMode)
Set streaming mode
sourcepub fn get_mode(&self) -> StreamingMode
pub fn get_mode(&self) -> StreamingMode
Get streaming mode
sourcepub fn set_reverse(&mut self, reverse: bool)
pub fn set_reverse(&mut self, reverse: bool)
Set the read order (lexicographic or non-lexicographic)
sourcepub fn get_reverse(&self) -> bool
pub fn get_reverse(&self) -> bool
Get the read order (lexicographic or non-lexicographic)
Trait Implementations§
source§impl Clone for RangeOptions
impl Clone for RangeOptions
source§fn clone(&self) -> RangeOptions
fn clone(&self) -> RangeOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RangeOptions
impl Debug for RangeOptions
source§impl Default for RangeOptions
impl Default for RangeOptions
source§fn default() -> RangeOptions
fn default() -> RangeOptions
source§impl PartialEq<RangeOptions> for RangeOptions
impl PartialEq<RangeOptions> for RangeOptions
source§fn eq(&self, other: &RangeOptions) -> bool
fn eq(&self, other: &RangeOptions) -> bool
self
and other
values to be equal, and is used
by ==
.