1 unstable release
Uses old Rust 2015
0.0.1 | May 4, 2015 |
---|
#25 in #specialized
23KB
495 lines
linked-tail-list
A specialized linked list.
lib.rs
:
This module implements a specialized linked list.
The implemented list (from now on called a tail list) is neither a singly nor doubly linked: aside from the optional link to the next node, each node also has reference to the link which owns the node.
For each tail list there is one item which currently 'owns' a node and it's tail (all the following nodes). 'Owns' in this context does not mean actual ownership in rust terms, but rather 'mutably borrows' this node (and it's) tail. This item will be referred to as the active item.
For each node which is not owned by the currently active item, there exists at most one passive item, which owns a single node, but neither it's predecessors nor successors.
A TailList
, Cursor
and TailValRef
are active items. A ValRef
is a
passive item.
An active item may temporarily transfer ownership of it's owned node to another item by creating a mutable borrow to itself.