pub struct Tuple { /* private fields */ }
Expand description
Represents a set of elements that make up a sortable, typed key.
Tuple
is comparable with other Tuple
s and will sort in
Rust in the same order in which they would sort in FDB. Tuple
s
sort first by the first element, then by the second, etc., This
make tuple layer ideal for building a variety of higher-level data
models.
For general guidance on tuple usage, see this link.
Tuple
can contain Null
, Bytes
, String
, another
Tuple
, BigInt
, i64
, i32
, i16
, i8
, f32
,
f64
, bool
, Uuid
, Versionstamp
values.
Implementations§
source§impl Tuple
impl Tuple
sourcepub fn get<'a, T>(&'a self, index: usize) -> Option<T>where
T: TupleElementGet<'a> + 'a,
pub fn get<'a, T>(&'a self, index: usize) -> Option<T>where T: TupleElementGet<'a> + 'a,
sourcepub fn pop_back<T>(&mut self) -> Option<T>where
T: TupleElementPop,
pub fn pop_back<T>(&mut self) -> Option<T>where T: TupleElementPop,
sourcepub fn pop_front<T>(&mut self) -> Option<T>where
T: TupleElementPop,
pub fn pop_front<T>(&mut self) -> Option<T>where T: TupleElementPop,
sourcepub fn push_back<T>(&mut self, value: T)where
T: TupleElementPush,
pub fn push_back<T>(&mut self, value: T)where T: TupleElementPush,
Appends a Tuple
element.
sourcepub fn push_front<T>(&mut self, value: T)where
T: TupleElementPush,
pub fn push_front<T>(&mut self, value: T)where T: TupleElementPush,
Prepends a Tuple
element.
sourcepub fn has_incomplete_versionstamp(&self) -> bool
pub fn has_incomplete_versionstamp(&self) -> bool
Determines if there is a Versionstamp
included in this
Tuple
that has not had its transaction version set.
sourcepub fn pack_with_versionstamp(&self, prefix: Bytes) -> FdbResult<Bytes>
pub fn pack_with_versionstamp(&self, prefix: Bytes) -> FdbResult<Bytes>
Get an encoded representation of this Tuple
for use with
SetVersionstampedKey
.
Panic
The index where incomplete versionstamp is located is a 32-bit
little-endian integer. If the generated index overflows
u32
, then this function panics.
Trait Implementations§
source§impl Ord for Tuple
impl Ord for Tuple
source§impl PartialEq<Tuple> for Tuple
impl PartialEq<Tuple> for Tuple
source§impl PartialOrd<Tuple> for Tuple
impl PartialOrd<Tuple> for Tuple
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more