pub struct StoreSnapshot(/* private fields */);Expand description
An opaque cursor into the MappingStore insertion sequence.
Obtained from MappingStore::snapshot and passed to
MappingStore::iter_since. Using a dedicated type prevents accidentally
passing an unrelated usize (a count, an index, a capacity) to
iter_since, which would silently yield the wrong subset of entries.
Breaking change in 0.13.0: MappingStore::snapshot previously returned
usize; it now returns StoreSnapshot. Call sites should change
store.snapshot() → the new type and iter_since(n) → iter_since(snap).
To iterate all entries use StoreSnapshot::start instead of the literal 0.
Implementations§
Source§impl StoreSnapshot
impl StoreSnapshot
Sourcepub fn start() -> Self
pub fn start() -> Self
A snapshot representing the beginning of the store (before any
insertions). Passing this to MappingStore::iter_since yields every
entry in the store — equivalent to the former iter_since(0).
Trait Implementations§
Source§impl Clone for StoreSnapshot
impl Clone for StoreSnapshot
Source§fn clone(&self) -> StoreSnapshot
fn clone(&self) -> StoreSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StoreSnapshot
Source§impl Debug for StoreSnapshot
impl Debug for StoreSnapshot
Source§impl Default for StoreSnapshot
impl Default for StoreSnapshot
impl Eq for StoreSnapshot
Source§impl PartialEq for StoreSnapshot
impl PartialEq for StoreSnapshot
Source§fn eq(&self, other: &StoreSnapshot) -> bool
fn eq(&self, other: &StoreSnapshot) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoreSnapshot
Auto Trait Implementations§
impl Freeze for StoreSnapshot
impl RefUnwindSafe for StoreSnapshot
impl Send for StoreSnapshot
impl Sync for StoreSnapshot
impl Unpin for StoreSnapshot
impl UnsafeUnpin for StoreSnapshot
impl UnwindSafe for StoreSnapshot
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
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
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>
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