Struct fdb_rl::range::TupleRange
source · pub struct TupleRange {
low_endpoint: TupleLowEndpoint,
high_endpoint: TupleHighEndpoint,
}
Expand description
A range within an optional subspace specified by two Tuple
endpoints.
A TupleRange
can be converted into a KeyRange
.
Fields§
§low_endpoint: TupleLowEndpoint
§high_endpoint: TupleHighEndpoint
Implementations§
source§impl TupleRange
impl TupleRange
sourcepub fn new(
low_endpoint: TupleLowEndpoint,
high_endpoint: TupleHighEndpoint
) -> TupleRange
pub fn new( low_endpoint: TupleLowEndpoint, high_endpoint: TupleHighEndpoint ) -> TupleRange
Create a TupleRange
sourcepub fn all() -> TupleRange
pub fn all() -> TupleRange
Create a TupleRange
of all the tuples.
sourcepub fn all_of(prefix: &Tuple) -> TupleRange
pub fn all_of(prefix: &Tuple) -> TupleRange
Create a TupleRange
over all keys beginning with a given
Tuple
.
This is a shortcut for creating a TupleRange
with prefix
as both the low-endpoint and high-endpoint and setting the
type to range inclusive.
sourcepub fn between(low: &Option<Tuple>, high: &Option<Tuple>) -> TupleRange
pub fn between(low: &Option<Tuple>, high: &Option<Tuple>) -> TupleRange
Create a TupleRange
over all keys between the given Tuple
s.
low
is the inclusive start of the range. None
indicates
the beginning.
high
is the exclusive end of the range. None
indicates
the end.
sourcepub fn prepend(self, beginning: &Tuple) -> TupleRange
pub fn prepend(self, beginning: &Tuple) -> TupleRange
Create a TupleRange
over the same keys as this range but
prepended by the supplied Tuple
.
For example, if this range is over all Tuple
’s from ("a", 3,)
exclusive to ("b", 4,)
inclusive, and one calls this
method with (0, null)
as the argument, this will create a
range from (0, null, "a", 3,)
exclusive to (0, null, "b", 4,)
inclusive.
Trait Implementations§
source§impl Clone for TupleRange
impl Clone for TupleRange
source§fn clone(&self) -> TupleRange
fn clone(&self) -> TupleRange
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TupleRange
impl Debug for TupleRange
source§impl PartialEq<TupleRange> for TupleRange
impl PartialEq<TupleRange> for TupleRange
source§fn eq(&self, other: &TupleRange) -> bool
fn eq(&self, other: &TupleRange) -> bool
self
and other
values to be equal, and is used
by ==
.