pub enum KeyRange {
Bounded(KeyPosition, KeyPosition),
Unbounded(KeyPosition),
}Expand description
A range of keys in the keyspace.
Variants§
Bounded(KeyPosition, KeyPosition)
Unbounded(KeyPosition)
Implementations§
Source§impl KeyRange
impl KeyRange
Sourcepub fn new(start: KeyPosition, end: Option<KeyPosition>) -> Self
pub fn new(start: KeyPosition, end: Option<KeyPosition>) -> Self
Create a new key range from the given start and end positions.
Sourcepub fn contains(&self, key_hash: KeyPosition) -> bool
pub fn contains(&self, key_hash: KeyPosition) -> bool
Check if the given key is in the range.
Note not the key itself, but the hash of the key provides the position within keyspace.
Trait Implementations§
impl Copy for KeyRange
impl Eq for KeyRange
impl StructuralPartialEq for KeyRange
Auto Trait Implementations§
impl Freeze for KeyRange
impl RefUnwindSafe for KeyRange
impl Send for KeyRange
impl Sync for KeyRange
impl Unpin for KeyRange
impl UnwindSafe for KeyRange
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