EntryRef

Struct EntryRef 

Source
pub struct EntryRef<'a, K, V, S, C, A, R>
where K: ?Sized + Type, V: ?Sized + Type, A: Allocator, R: RefCounter, S: State,
{ /* private fields */ }
Expand description

An entry reference of the SkipMap.

Implementations§

Source§

impl<'a, K, V, S, C, A, R> EntryRef<'a, K, V, S, C, A, R>
where K: ?Sized + Type, V: ?Sized + Type, A: Allocator, R: RefCounter, S: State,

Source

pub const fn comparator(&self) -> &C

Returns the comparator.

Source

pub fn key(&self) -> &K::Ref<'a>

Returns the reference to the key

Source

pub fn raw_key(&self) -> &'a [u8]

Returns the key in raw bytes

Source

pub fn value(&self) -> S::Data<'a, S::To>
where S: Transfer<'a, LazyRef<'a, V>>,

Returns the reference to the value, None means the entry is removed.

Source

pub fn raw_value(&self) -> S::Data<'a, &'a [u8]>
where S: Transfer<'a, LazyRef<'a, V>>,

Returns the value in raw bytes

Source

pub fn tombstone(&self) -> bool
where S: Transfer<'a, LazyRef<'a, V>>,

Returns true if the entry is marked as removed

Source§

impl<'a, K, V, S, C, A, R> EntryRef<'a, K, V, S, C, A, R>
where K: ?Sized + Type, V: ?Sized + Type, S: Transfer<'a, LazyRef<'a, V>>, A: Allocator, R: RefCounter, C: TypeRefComparator<'a, K>,

Source

pub fn next(&self) -> Option<Self>

Returns the next entry in the map.

Source

pub fn prev(&self) -> Option<Self>

Returns the previous entry in the map.

Source§

impl<K, V, S, C, A, R> EntryRef<'_, K, V, S, C, A, R>
where K: ?Sized + Type, V: ?Sized + Type, S: State, A: Allocator, A::Node: WithVersion, R: RefCounter,

Source

pub fn version(&self) -> Version

Returns the version of the entry

Trait Implementations§

Source§

impl<'a, K, V, S, C, A, R> Clone for EntryRef<'a, K, V, S, C, A, R>
where K: ?Sized + Type, V: ?Sized + Type, A: Allocator, R: RefCounter, S: State, S::Data<'a, LazyRef<'a, V>>: Sized + Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a, K, V, S, C, A, R> Debug for EntryRef<'a, K, V, S, C, A, R>
where K: ?Sized + Type, V: ?Sized + Type, A: Allocator, R: RefCounter, S: Transfer<'a, LazyRef<'a, V>>, S::Data<'a, S::To>: Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, K, V, S, C, A, R> !Freeze for EntryRef<'a, K, V, S, C, A, R>

§

impl<'a, K, V, S, C, A, R> !RefUnwindSafe for EntryRef<'a, K, V, S, C, A, R>

§

impl<'a, K, V, S, C, A, R> Send for EntryRef<'a, K, V, S, C, A, R>
where <S as State>::Data<'a, LazyRef<'a, V>>: Send, <<A as Sealed>::Node as Node>::Pointer: Send, A: Sync, R: Sync, C: Sync, <K as Type>::Ref<'a>: Send, K: ?Sized, V: ?Sized,

§

impl<'a, K, V, S, C, A, R> !Sync for EntryRef<'a, K, V, S, C, A, R>

§

impl<'a, K, V, S, C, A, R> Unpin for EntryRef<'a, K, V, S, C, A, R>
where <S as State>::Data<'a, LazyRef<'a, V>>: Unpin, <<A as Sealed>::Node as Node>::Pointer: Unpin, <K as Type>::Ref<'a>: Unpin, K: ?Sized, V: ?Sized,

§

impl<'a, K, V, S, C, A, R> UnwindSafe for EntryRef<'a, K, V, S, C, A, R>
where <S as State>::Data<'a, LazyRef<'a, V>>: UnwindSafe, <<A as Sealed>::Node as Node>::Pointer: UnwindSafe + RefUnwindSafe, A: RefUnwindSafe, C: RefUnwindSafe, R: RefUnwindSafe, <K as Type>::Ref<'a>: UnwindSafe, <A as Sealed>::Meta: RefUnwindSafe, K: ?Sized, V: ?Sized,

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<K, Q> Comparable<Q> for K
where K: Borrow<Q> + ?Sized, Q: Ord + ?Sized,

Source§

fn compare(&self, key: &Q) -> Ordering

Compare self to key and return their ordering.
Source§

impl<K, Q> Equivalent<Q> for K
where K: Borrow<Q> + ?Sized, Q: Eq + ?Sized,

Source§

fn equivalent(&self, key: &Q) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoAmong for T

Source§

fn into_among(self, into_left: Option<bool>) -> Among<Self, Self, Self>

Converts self into a Left variant of Among<Self, Self> if into_left is Some(true). Read more
Source§

fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
where F: FnOnce(&Self) -> Option<bool>,

Converts self into a Left variant of Among<Self, Self> if into_left(&self) returns Some(true). Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more