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
sourceimpl 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
sourceimpl Clone for RangeOptions
impl Clone for RangeOptions
sourcefn clone(&self) -> RangeOptions
fn clone(&self) -> RangeOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RangeOptions
impl Debug for RangeOptions
sourceimpl Default for RangeOptions
impl Default for RangeOptions
sourcefn default() -> RangeOptions
fn default() -> RangeOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for RangeOptions
impl Send for RangeOptions
impl Sync for RangeOptions
impl Unpin for RangeOptions
impl UnwindSafe for RangeOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more