Skip to main content

VersionedEntryRef

Struct VersionedEntryRef 

Source
pub struct VersionedEntryRef<'a, K, V> { /* private fields */ }
Expand description

A snapshot of one version of one key of a VersionedArtMap.

The handle captures a single version node when it is created, so value and version always belong together, whatever writers do meanwhile. Fresh reads are explicit: latest and get_version_le walk the current chain.

Bounded by the map borrow and an epoch guard; neither Send nor Sync.

Implementations§

Source§

impl<'a, K, V> VersionedEntryRef<'a, K, V>

Source

pub fn key(&self) -> &K

The entry’s key.

Source

pub fn value(&self) -> &V

The captured version’s value.

Source

pub fn version(&self) -> u64

The captured version.

Source

pub fn is_removed(&self) -> bool

true if the captured version was deleted when captured. Always false: handles never capture tombstones.

Source

pub fn is_superseded(&self) -> bool

true once the captured version has been unlinked: a same-version insert replaced it, remove or remove_version removed it, a prune unlinked it, or its whole key was removed, pruned or cleared.

Source

pub fn latest(&self) -> Option<VersionedEntryRef<'_, K, V>>

A fresh read of the key’s newest live version, sharing this handle’s protection (no new pin).

Source

pub fn get_version_le(&self, max_version: u64) -> Option<(u64, &V)>

A fresh walk of the key’s chain for the newest version <= max_version.

Trait Implementations§

Source§

impl<K, V> Clone for VersionedEntryRef<'_, K, V>

Source§

fn clone(&self) -> Self

Shares the protection (see EntryRef::clone).

1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: Debug, V: Debug> Debug for VersionedEntryRef<'_, K, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K, V> Deref for VersionedEntryRef<'_, K, V>

Source§

type Target = V

The resulting type after dereferencing.
Source§

fn deref(&self) -> &V

Dereferences the value.
Source§

impl<K: PartialEq, V: PartialEq> PartialEq for VersionedEntryRef<'_, K, V>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl<'a, K, V> !RefUnwindSafe for VersionedEntryRef<'a, K, V>

§

impl<'a, K, V> !Send for VersionedEntryRef<'a, K, V>

§

impl<'a, K, V> !Sync for VersionedEntryRef<'a, K, V>

§

impl<'a, K, V> !UnwindSafe for VersionedEntryRef<'a, K, V>

§

impl<'a, K, V> Freeze for VersionedEntryRef<'a, K, V>
where NonNull<VersionedLeaf<K, V>>: Freeze, NonNull<VersionNode<V>>: Freeze, &'a VersionedTree<K, V>: Freeze,

§

impl<'a, K, V> Unpin for VersionedEntryRef<'a, K, V>
where NonNull<VersionedLeaf<K, V>>: Unpin, NonNull<VersionNode<V>>: Unpin, &'a VersionedTree<K, V>: Unpin,

§

impl<'a, K, V> UnsafeUnpin for VersionedEntryRef<'a, K, V>
where NonNull<VersionedLeaf<K, V>>: UnsafeUnpin, NonNull<VersionNode<V>>: UnsafeUnpin, &'a VersionedTree<K, V>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.