Crate vec_with_positions
source · [−]Expand description
UNTESTED code.
TODO: docs
Structs
Example: Several threads use a pool of network nodes to download from. From the pool we “view” a range of currently used nodes, one by thread. If a note is invalidated, it is removed from the list and the lacking thread is moved to the end of the list receiving a new node. Nodes later than it in the range decrease their positions. Despite of the name, positions can be the same, if shortage of the pool.
Traits
A Vec
inside together with positions that move together with the elements if the Vec
has deletions or insertions.