pub struct VersionedPointer<T> { /* private fields */ }Expand description
Pointer + monotonic u64 version. Used for snapshot-isolation
reads: visible at a query snapshot when self.version <= snapshot.
Implementations§
Source§impl<T> VersionedPointer<T>
impl<T> VersionedPointer<T>
Sourcepub const SIGNATURE: AxisMask
pub const SIGNATURE: AxisMask
Direction signature of VersionedPointer<T>. Engages the
K_version axis (u64 version counter stored at slot for
ABA-safe CAS and MVCC visibility checks).
pub const fn new(target: Arc<T>, version: u64) -> Self
pub const fn version(&self) -> u64
pub fn target(&self) -> &Arc<T> ⓘ
Sourcepub const fn visible_at(&self, snapshot_version: u64) -> bool
pub const fn visible_at(&self, snapshot_version: u64) -> bool
True when this pointer is observable at snapshot_version.
Standard MVCC visibility: visible if its version is at or
before the snapshot.
Trait Implementations§
Source§impl<T: Clone> Clone for VersionedPointer<T>
impl<T: Clone> Clone for VersionedPointer<T>
Source§fn clone(&self) -> VersionedPointer<T>
fn clone(&self) -> VersionedPointer<T>
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<T: Debug> Debug for VersionedPointer<T>
impl<T: Debug> Debug for VersionedPointer<T>
Source§impl<T> PartialEq for VersionedPointer<T>
impl<T> PartialEq for VersionedPointer<T>
Source§impl<T> PartialOrd for VersionedPointer<T>
impl<T> PartialOrd for VersionedPointer<T>
Auto Trait Implementations§
impl<T> Freeze for VersionedPointer<T>
impl<T> RefUnwindSafe for VersionedPointer<T>where
Arc<T>: RefUnwindSafe,
impl<T> Send for VersionedPointer<T>
impl<T> Sync for VersionedPointer<T>
impl<T> Unpin for VersionedPointer<T>
impl<T> UnsafeUnpin for VersionedPointer<T>where
Arc<T>: UnsafeUnpin,
impl<T> UnwindSafe for VersionedPointer<T>where
Arc<T>: UnwindSafe,
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