pub struct RowIdSequence(/* private fields */);
Expand description
A sequence of row ids.
Row ids are u64s that:
- Are unique within a table (except for tombstones)
- Are often but not always sorted and/or contiguous.
This sequence of row ids is optimized to be compact when the row ids are contiguous and sorted. However, it does not require that the row ids are contiguous or sorted.
We can make optimizations that assume uniqueness.
Implementations§
Source§impl RowIdSequence
impl RowIdSequence
pub fn iter(&self) -> impl DoubleEndedIterator<Item = u64> + '_
pub fn len(&self) -> u64
pub fn is_empty(&self) -> bool
Sourcepub fn extend(&mut self, other: Self)
pub fn extend(&mut self, other: Self)
Combines this row id sequence with another row id sequence.
Sourcepub fn delete(&mut self, row_ids: impl IntoIterator<Item = u64>)
pub fn delete(&mut self, row_ids: impl IntoIterator<Item = u64>)
Remove a set of row ids from the sequence.
Sourcepub fn mask(&mut self, positions: impl IntoIterator<Item = u32>) -> Result<()>
pub fn mask(&mut self, positions: impl IntoIterator<Item = u32>) -> Result<()>
Delete row ids by position.
pub fn slice(&self, offset: usize, len: usize) -> RowIdSeqSlice<'_>
Trait Implementations§
Source§impl Clone for RowIdSequence
impl Clone for RowIdSequence
Source§fn clone(&self) -> RowIdSequence
fn clone(&self) -> RowIdSequence
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RowIdSequence
impl Debug for RowIdSequence
Source§impl DeepSizeOf for RowIdSequence
impl DeepSizeOf for RowIdSequence
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
Source§impl Display for RowIdSequence
impl Display for RowIdSequence
Source§impl From<&RowIdSequence> for RowIdTreeMap
impl From<&RowIdSequence> for RowIdTreeMap
Source§fn from(row_ids: &RowIdSequence) -> Self
fn from(row_ids: &RowIdSequence) -> Self
Converts to this type from the input type.
Source§impl From<RowIdSequence> for RowIdSequence
impl From<RowIdSequence> for RowIdSequence
Source§fn from(sequence: RowIdSequence) -> Self
fn from(sequence: RowIdSequence) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RowIdSequence
impl PartialEq for RowIdSequence
Source§impl TryFrom<RowIdSequence> for RowIdSequence
impl TryFrom<RowIdSequence> for RowIdSequence
impl Eq for RowIdSequence
impl StructuralPartialEq for RowIdSequence
Auto Trait Implementations§
impl Freeze for RowIdSequence
impl RefUnwindSafe for RowIdSequence
impl Send for RowIdSequence
impl Sync for RowIdSequence
impl Unpin for RowIdSequence
impl UnwindSafe for RowIdSequence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.