Struct key_node_list::KeyNodeList[][src]

pub struct KeyNodeList<K, N, M = HashMap<K, N>> { /* fields omitted */ }
Expand description

A doubly-linked list that stores key-node pairs.

Implementations

Creates an linked list with the given hash map map.

Returns a reference to the front key, or None if the list is empty.

This operation should compute in O(1) time.

Returns a reference to the back key, or None if the list is empty.

This operation should compute in O(1) time.

Returns the number of key-node pairs in the list.

This operation should compute in O(1) time.

Returns true if the list contains no key-node pairs.

This operation should compute in O(1) time.

Removes all key-node pairs in the list.

Returns an iterator over all keys and nodes. The iterator element type is (&'a K, &'a N).

Returns an iterator over all keys. The iterator element type is &'a K.

Returns an iterator over all nodes. The iterator element type is &'a N.

Creates an empty linked list.

Returns true if the linked list contains a node for the specified key.

This operation should compute in O(1) time on average.

Returns a reference to the node corresponding to the key, or None if key does not exist.

This operation should compute in O(1) time on average.

Returns a mutable reference to the node corresponding to the key, or None if key does not exist.

This operation should compute in O(1) time on average.

Returns a reference to the front node, or None if the list is empty.

This operation should compute in O(1) time on average.

Returns a mutable reference to the front node, or None if the list is empty.

This operation should compute in O(1) time on average.

Returns a reference to the back node, or None if the list is empty.

This operation should compute in O(1) time on average.

Returns a mutable reference to the back node, or None if the list is empty.

This operation should compute in O(1) time on average.

Provides a cursor at the specific key.

The cursor is pointing to the null pair if the key does not exist.

Provides a cursor with editing operations at the specific key.

The cursor is pointing to the null pair if the key does not exist.

Provides a cursor at the front key-node pair.

The cursor is pointing to the null pair if the list is empty.

Provides a cursor with editing operations at the front key-node pair.

The cursor is pointing to the null pair if the list is empty.

Provides a cursor at the back key-node pair.

The cursor is pointing to the null pair if the list is empty.

Provides a cursor with editing operations at the back key-node pair.

The cursor is pointing to the null pair if the list is empty.

Creates a consuming iterator over all keys. The list cannot be used after calling this. The iterator element type is K.

Creates a consuming iterator over all nodes. The list cannot be used after calling this. The iterator element type is N.

Adds an key-node pair first in the list.

If key already exists, returns an error containing key and node.

This operation should compute in O(1) time on average.

Adds an key-node pair back in the list.

If key already exists, returns an error containing key and node.

This operation should compute in O(1) time on average.

Removes the first key-node pair and returns it, or None if the list is empty.

This operation should compute in O(1) time on average.

Removes the last key-node pair and returns it, or None if the list is empty.

This operation should compute in O(1) time on average.

Removes the key-node pair at the given key and returns it, or returns None if key does not exists.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Performs the conversion.

Creates a value from an iterator. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. 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

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.