SkipList

Struct SkipList 

Source
pub struct SkipList<'domain, K, V> { /* private fields */ }

Implementations§

Source§

impl<'domain, K, V> SkipList<'domain, K, V>

Source

pub fn new() -> Self

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source§

impl<'domain, K, V> SkipList<'domain, K, V>
where K: Ord + Send + Sync, V: Send + Sync,

Source

pub fn insert<'a>(&'a self, key: K, val: V) -> Option<Entry<'a, K, V>>

Inserts a value in the list given a key.

Source

pub fn remove<'a>(&'a self, key: &K) -> Option<Entry<'a, K, V>>
where K: Send, V: Send,

Source

pub fn get<'a>(&'a self, key: &K) -> Option<Entry<'a, K, V>>

Source

pub fn get_first<'a>(&'a self) -> Option<Entry<'a, K, V>>

Source

pub fn get_last<'a>(&'a self) -> Option<Entry<'a, K, V>>

Source

pub fn iter<'a>(&'a self) -> Iter<'a, K, V>

Trait Implementations§

Source§

impl<'a, K, V> Debug for SkipList<'a, K, V>

Source§

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

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

impl<'domain, K, V> Default for SkipList<'domain, K, V>
where K: Sync, V: Sync,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'domain, K, V> Drop for SkipList<'domain, K, V>

Manual Drop implementation for all SkipLists

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'domain, K, V> From<SkipList<'domain, K, V>> for SkipList<'domain, K, V>
where K: Sync, V: Sync,

Source§

fn from(list: SkipList<'domain, K, V>) -> Self

Converts to this type from the input type.
Source§

impl<'a, K, V> FromIterator<(K, V)> for SkipList<'a, K, V>
where K: Ord + Send + Sync, V: Send + Sync,

Source§

fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl<'a, K, V> IntoIterator for SkipList<'a, K, V>
where K: Ord + Send + Sync, V: Send + Sync,

Source§

type Item = (K, V)

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<K, V>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'domain, K, V> Send for SkipList<'domain, K, V>
where K: Send + Sync, V: Send + Sync,

Source§

impl<'domain, K, V> Sync for SkipList<'domain, K, V>
where K: Send + Sync, V: Send + Sync,

Auto Trait Implementations§

§

impl<'domain, K, V> !Freeze for SkipList<'domain, K, V>

§

impl<'domain, K, V> RefUnwindSafe for SkipList<'domain, K, V>

§

impl<'domain, K, V> Unpin for SkipList<'domain, K, V>

§

impl<'domain, K, V> UnwindSafe for SkipList<'domain, K, V>

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> 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, 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> Reclaim for T