pub struct StoreSnapshot<R: GridRow> { /* private fields */ }Expand description
An immutable view of every row at one store version.
Implementations§
Source§impl<R: GridRow> StoreSnapshot<R>
impl<R: GridRow> StoreSnapshot<R>
Sourcepub fn row(&self, id: RowId) -> Option<&Arc<R>>
pub fn row(&self, id: RowId) -> Option<&Arc<R>>
The row with this id, or None if it was removed since.
Sourcepub fn row_id(&self, key: &R::Key) -> Option<RowId>
pub fn row_id(&self, key: &R::Key) -> Option<RowId>
The id of the row with this key in this snapshot.
Sourcepub fn stamps(&self, id: RowId) -> Option<RowStamps<'_>>
pub fn stamps(&self, id: RowId) -> Option<RowStamps<'_>>
The change stamps of the row’s cells, if any is hot. Read a cell’s
with RowStamps::get.
Sourcepub fn seq(&self, id: RowId) -> u64
pub fn seq(&self, id: RowId) -> u64
The insertion sequence of the row: the stable tie-breaker for sorting.
Sourcepub fn iter(&self) -> impl Iterator<Item = (RowId, &Arc<R>)>
pub fn iter(&self) -> impl Iterator<Item = (RowId, &Arc<R>)>
Every live row with its id, in storage order.
Sourcepub fn pinned_rows(&self, edge: PinnedEdge) -> &[Arc<R>]
pub fn pinned_rows(&self, edge: PinnedEdge) -> &[Arc<R>]
The rows pinned at edge, in order. Their keys are a space of their
own: a pinned row may share its key with a data row or with a row of
the other band.
Sourcepub fn pinned_stamps(
&self,
edge: PinnedEdge,
ix: usize,
) -> Option<RowStamps<'_>>
pub fn pinned_stamps( &self, edge: PinnedEdge, ix: usize, ) -> Option<RowStamps<'_>>
The change stamps of the cells of the ix-th row pinned at edge,
if any is hot.
Sourcepub fn progress(&self) -> Option<&GridProgress>
pub fn progress(&self) -> Option<&GridProgress>
The progress written through GridWriter::set_progress.
Sourcepub fn fading_row(&self, id: RowId) -> Option<(&Arc<R>, Stamp)>
pub fn fading_row(&self, id: RowId) -> Option<(&Arc<R>, Stamp)>
A removed row while it fades out
(HighlightPolicy::with_removal_fade): its last version and its
removal stamp. id is the row’s id before removal (its old
generation), so it never resolves to a live row.
Sourcepub fn fading_rows(&self) -> impl Iterator<Item = (RowId, &Arc<R>, Stamp, u64)>
pub fn fading_rows(&self) -> impl Iterator<Item = (RowId, &Arc<R>, Stamp, u64)>
Every fading row with its id, removal stamp and insertion sequence
(the tie-breaker for sorting, as Self::seq of a live row), in no
particular order.
Sourcepub fn stamp_bytes(&self) -> usize
pub fn stamp_bytes(&self) -> usize
Bytes held by the change stamps of data rows, their allocations’ reference counts included (for the spike’s memory measurement).
Auto Trait Implementations§
impl<R> Freeze for StoreSnapshot<R>
impl<R> RefUnwindSafe for StoreSnapshot<R>
impl<R> Send for StoreSnapshot<R>
impl<R> Sync for StoreSnapshot<R>
impl<R> Unpin for StoreSnapshot<R>
impl<R> UnsafeUnpin for StoreSnapshot<R>
impl<R> UnwindSafe for StoreSnapshot<R>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 more