Struct crossbeam_skiplist::base::Entry [−][src]
An entry in a skip list, protected by a Guard
.
The lifetimes of the key and value are the same as that of the Guard
used when creating the Entry
('g
). This lifetime is also constrained to
not outlive the SkipList
.
Implementations
impl<'a: 'g, 'g, K: 'a, V: 'a> Entry<'a, 'g, 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) -> &'g K
[src][−]
Returns a reference to the key.
pub fn value(&self) -> &'g 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 pin(&self) -> Option<RefEntry<'a, K, V>>
[src][−]
Attempts to pin the entry with a reference count, ensuring that it
remains accessible even after the Guard
is dropped.
This method may return None
if the reference count is already 0 and
the node has been queued for deletion.
impl<'a: 'g, 'g, K, V> Entry<'a, 'g, K, V> where
K: Ord + Send + 'static,
V: Send + 'static,
[src][−]
K: Ord + Send + 'static,
V: Send + 'static,
pub fn remove(&self) -> 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: 'g, 'g, K, V> Entry<'a, 'g, K, V> where
K: Ord,
[src][−]
K: Ord,
pub fn move_next(&mut self) -> bool
[src][−]
Moves to the next entry in the skip list.
pub fn next(&self) -> Option<Entry<'a, 'g, K, V>>
[src][−]
Returns the next entry in the skip list.
pub fn move_prev(&mut self) -> bool
[src][−]
Moves to the previous entry in the skip list.
pub fn prev(&self) -> Option<Entry<'a, 'g, K, V>>
[src][−]
Returns the previous entry in the skip list.
Trait Implementations
impl<'a: 'g, 'g, K, V> Clone for Entry<'a, 'g, K, V>
[src][+]
impl<K, V> Debug for Entry<'_, '_, K, V> where
K: Debug,
V: Debug,
[src][+]
K: Debug,
V: Debug,
Auto Trait Implementations
impl<'a, 'g, K, V> !RefUnwindSafe for Entry<'a, 'g, K, V>
impl<'a, 'g, K, V> !Send for Entry<'a, 'g, K, V>
impl<'a, 'g, K, V> !Sync for Entry<'a, 'g, K, V>
impl<'a, 'g, K, V> Unpin for Entry<'a, 'g, K, V>
impl<'a, 'g, K, V> !UnwindSafe for Entry<'a, 'g, 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,
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][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,