pub struct SnapshotId(/* private fields */);Expand description
Opaque identifier for a single live MVCC reader snapshot.
The id is monotonic per-pager; the value is otherwise meaningless
to callers — it only exists so the (private) SnapshotPin RAII
guard can deregister the right entry from the pager’s live-
snapshots map when it drops.
SnapshotId is a #[repr(transparent)] newtype over u64 (Power-
of-Ten Rule 5). The serde encoding is #[serde(transparent)] so
the bytes are identical to the bare u64; today SnapshotId is
purely in-memory, but the transparent encoding preserves wire
compatibility for any future diagnostics record that names it.
Implementations§
Source§impl SnapshotId
impl SnapshotId
Trait Implementations§
Source§impl Clone for SnapshotId
impl Clone for SnapshotId
Source§fn clone(&self) -> SnapshotId
fn clone(&self) -> SnapshotId
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 moreSource§impl Debug for SnapshotId
impl Debug for SnapshotId
Source§impl<'de> Deserialize<'de> for SnapshotId
impl<'de> Deserialize<'de> for SnapshotId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SnapshotId
impl Hash for SnapshotId
Source§impl Ord for SnapshotId
impl Ord for SnapshotId
Source§fn cmp(&self, other: &SnapshotId) -> Ordering
fn cmp(&self, other: &SnapshotId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SnapshotId
impl PartialEq for SnapshotId
Source§fn eq(&self, other: &SnapshotId) -> bool
fn eq(&self, other: &SnapshotId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SnapshotId
impl PartialOrd for SnapshotId
Source§impl Serialize for SnapshotId
impl Serialize for SnapshotId
impl Copy for SnapshotId
impl Eq for SnapshotId
impl StructuralPartialEq for SnapshotId
Auto Trait Implementations§
impl Freeze for SnapshotId
impl RefUnwindSafe for SnapshotId
impl Send for SnapshotId
impl Sync for SnapshotId
impl Unpin for SnapshotId
impl UnsafeUnpin for SnapshotId
impl UnwindSafe for SnapshotId
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