| Crates.io | indexlist |
| lib.rs | indexlist |
| version | 0.1.0 |
| created_at | 2018-09-14 21:42:01.85072+00 |
| updated_at | 2018-09-14 21:42:01.85072+00 |
| description | A doubly linked list, backed by a vector |
| homepage | https://github.com/steveklabnik/indexlist |
| repository | https://github.com/steveklabnik/indexlist |
| max_upload_size | |
| id | 84777 |
| size | 44,257 |
indexlist - A doubly linked list, backed by a vector.This crate provides a struct, IndexList<T>, which is a doubly-linked
list. However, unlike a traditional linked list, which heap allocates
each of its nodes individually, all nodes are stored in a vector. Rather
than provide pointers to nodes, an Index struct can be used to access
a particular elemnt in the middle of the list.
This crate uses #![deny(unsafe_code)] to ensure everything is implemented
in 100% Safe Rust.
Index uses a generations scheme, so that if you hold an Index to a node,
and it's removed, and a new node is allocated in its place, you do not access
the new node.
In general, performance is quite good. Benchmarks against the standard library's
LinkedList<T> are provided. But some other details:
Right now, I've only implemented a minimal number of features; there's iter
but no into_iter and iter_mut. This is on the to-do list. PRs welcome!