Struct crossbeam_skiplist::base::RefEntry [−][src]
A reference-counted entry in a skip list.
You must call release
to free this type, otherwise the node will be
leaked. This is because releasing the entry requires a Guard
.
Implementations
impl<'a, K: 'a, V: 'a> RefEntry<'a, K, V>
[src]
pub fn is_removed(&self) -> bool
[src]
Returns true
if the entry is removed from the skip list.
pub fn key(&self) -> &K
[src]
Returns a reference to the key.
pub fn value(&self) -> &V
[src]
Returns a reference to the value.
pub fn skiplist(&self) -> &'a SkipList<K, V>
[src]
Returns a reference to the parent SkipList
pub fn release(self, guard: &Guard)
[src]
Releases the reference on the entry.
pub fn release_with_pin<F>(self, pin: F) where
F: FnOnce() -> Guard,
[src]
F: FnOnce() -> Guard,
Releases the reference of the entry, pinning the thread only when the reference count of the node becomes 0.
impl<K, V> RefEntry<'_, K, V> where
K: Ord + Send + 'static,
V: Send + 'static,
[src]
K: Ord + Send + 'static,
V: Send + 'static,
pub fn remove(&self, guard: &Guard) -> bool
[src]
Removes the entry from the skip list.
Returns true
if this call removed the entry and false
if it was already removed.
impl<'a, K, V> RefEntry<'a, K, V> where
K: Ord,
[src]
K: Ord,
pub fn move_next(&mut self, guard: &Guard) -> bool
[src]
Moves to the next entry in the skip list.
pub fn next(&self, guard: &Guard) -> Option<RefEntry<'a, K, V>>
[src]
Returns the next entry in the skip list.
pub fn move_prev(&mut self, guard: &Guard) -> bool
[src]
Moves to the previous entry in the skip list.
pub fn prev(&self, guard: &Guard) -> Option<RefEntry<'a, K, V>>
[src]
Returns the previous entry in the skip list.
Trait Implementations
impl<'a, K, V> Clone for RefEntry<'a, K, V>
[src]
impl<K, V> Debug for RefEntry<'_, K, V> where
K: Debug,
V: Debug,
[src]
K: Debug,
V: Debug,
Auto Trait Implementations
impl<'a, K, V> !RefUnwindSafe for RefEntry<'a, K, V>
impl<'a, K, V> Send for RefEntry<'a, K, V> where
K: Send + Sync,
V: Send + Sync,
K: Send + Sync,
V: Send + Sync,
impl<'a, K, V> Sync for RefEntry<'a, K, V> where
K: Send + Sync,
V: Send + Sync,
K: Send + Sync,
V: Send + Sync,
impl<'a, K, V> Unpin for RefEntry<'a, K, V>
impl<'a, K, V> !UnwindSafe for RefEntry<'a, K, V>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,