pub struct SkipList<K, V> { /* private fields */ }
Expand description

A lock-free skip list.

Implementations

Returns a new, empty skip list.

Returns true if the skip list is empty.

Returns the number of entries in the skip list.

If the skip list is being concurrently modified, consider the returned number just an approximation without any guarantees.

Returns the entry with the smallest key.

Returns the entry with the largest key.

Returns true if the map contains a value for the specified key.

Returns an entry with the specified key.

Returns an Entry pointing to the lowest element whose key is above the given bound. If no such element is found then None is returned.

Returns an Entry pointing to the highest element whose key is below the given bound. If no such element is found then None is returned.

Finds an entry with the specified key, or inserts a new key-value pair if none exist.

Finds an entry with the specified key, or inserts a new key-value pair if none exist, where value is calculated with a function.

Note: Another thread may write key value first, leading to the result of this closure discarded. If closure is modifying some other state (such as shared counters or shared objects), it may lead to undesired behaviour such as counters being changed without result of closure inserted

Returns an iterator over all entries in the skip list.

Returns an iterator over all entries in the skip list.

Returns an iterator over a subset of entries in the skip list.

Returns an iterator over a subset of entries in the skip list.

Inserts a key-value pair into the skip list and returns the new entry.

If there is an existing entry with this key, it will be removed before inserting the new one.

Removes an entry with the specified key from the map and returns it.

Removes an entry from the front of the skip list.

Removes an entry from the back of the skip list.

Iterates over the map and removes every entry.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.