pub struct RowKeyRange { /* private fields */ }Expand description
A canonical primary-row-key half-open interval for one table.
Implementations§
Source§impl RowKeyRange
impl RowKeyRange
Sourcepub const fn full_table(table_id: u32) -> Self
pub const fn full_table(table_id: u32) -> Self
Creates a whole-table range.
Sourcepub fn new(
table_id: u32,
lower_inclusive: Option<u64>,
upper_exclusive: Option<u64>,
) -> Result<Self, RowKeyRangeError>
pub fn new( table_id: u32, lower_inclusive: Option<u64>, upper_exclusive: Option<u64>, ) -> Result<Self, RowKeyRangeError>
Creates a validated half-open row-id interval within one table.
Sourcepub fn from_keys(
lower_inclusive: Option<CanonicalRowKey>,
upper_exclusive: Option<CanonicalRowKey>,
table_id: u32,
) -> Result<Self, RowKeyRangeError>
pub fn from_keys( lower_inclusive: Option<CanonicalRowKey>, upper_exclusive: Option<CanonicalRowKey>, table_id: u32, ) -> Result<Self, RowKeyRangeError>
Creates a range from canonical key bounds, rejecting cross-table input.
Sourcepub const fn lower_inclusive(self) -> Option<u64>
pub const fn lower_inclusive(self) -> Option<u64>
Returns the lower row-id bound, if it narrows the table minimum.
Sourcepub const fn upper_exclusive(self) -> Option<u64>
pub const fn upper_exclusive(self) -> Option<u64>
Returns the upper row-id bound, if it narrows the table end.
Sourcepub fn encoded_bounds(self) -> EncodedRowKeyRange
pub fn encoded_bounds(self) -> EncodedRowKeyRange
Converts the logical interval into storage scan bytes.
Sourcepub fn contains(self, key: CanonicalRowKey) -> bool
pub fn contains(self, key: CanonicalRowKey) -> bool
Tests a decoded primary row key against the logical half-open interval.
Trait Implementations§
Source§impl Clone for RowKeyRange
impl Clone for RowKeyRange
Source§fn clone(&self) -> RowKeyRange
fn clone(&self) -> RowKeyRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RowKeyRange
Source§impl Debug for RowKeyRange
impl Debug for RowKeyRange
impl Eq for RowKeyRange
Source§impl PartialEq for RowKeyRange
impl PartialEq for RowKeyRange
impl StructuralPartialEq for RowKeyRange
Auto Trait Implementations§
impl Freeze for RowKeyRange
impl RefUnwindSafe for RowKeyRange
impl Send for RowKeyRange
impl Sync for RowKeyRange
impl Unpin for RowKeyRange
impl UnsafeUnpin for RowKeyRange
impl UnwindSafe for RowKeyRange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more