Crate token_deque

Source
Expand description

A double-ended queue (deque) that allows internal nodes to be removed in addition to the front and the back of the list.

Internally, the deque uses a Vec, and tracks next, previous, front, and back elements by index.

As items are removed from the deque, their memory in the Vec is put on an internal free list. This free list is used when items are inserted into the list before the internal Vec is expanded.

Structsยง

Deque
A deque that supports removing of nodes not in front or back position, but also nodes in front and back position.
DrainBack
A draining iterator over the deque starting from the front. It is constructed from the drain_back method on Deque.
DrainFront
A draining iterator over the deque starting from the front. It is constructed from the drain_front method on Deque.
IterBack
An iterator over the deque starting from the back. It is constructed from the iter_back method on Deque.
IterFront
An iterator over the deque starting from the front. It is constructed from the iter_front method on Deque.
Token
A token representing an item in the List. It can be used to try and remove the item from the list, or try to get the value of the item in the list. It contains a generation number that prevents the wrong item (that may have come to inhabit the same location) from being removed.