#linked-list #list #collection

atlist-rs

A LinkedList which is allowed to insert/remove element by immutable iterator.Adding, removing and moving the elements within the list or across several lists does not invalidate the iterators or references. An iterator is invalidated only when the corresponding element is deleted.

3 unstable releases

0.2.1 Mar 6, 2021
0.2.0 Mar 5, 2021
0.1.0 Feb 26, 2021

#2204 in Data structures

Download history 15/week @ 2023-12-11 20/week @ 2023-12-18 24/week @ 2023-12-25 26/week @ 2024-01-08 17/week @ 2024-01-15 10/week @ 2024-01-22 12/week @ 2024-01-29 17/week @ 2024-02-05 39/week @ 2024-02-12 55/week @ 2024-02-19 46/week @ 2024-02-26 33/week @ 2024-03-04 31/week @ 2024-03-11 44/week @ 2024-03-18 67/week @ 2024-03-25

184 downloads per month
Used in 8 crates (via music-player-tracklist)

MIT/Apache

67KB
1.5K SLoC

atlist

github action badge codecov badge crates.io badge docs.rs badge license badge

Documentation

A LinkedList in which the liftime of iterator is independent from LinkedList.So it's allowed to store iterator into anywhere and insert/remove element by iterator at any time.

Adding, removing and moving a iterator does not invalidate other iterators or references. An iterator is invalidated only when the corresponding element is deleted.

We use core::cell::RefCell and std::sync::Arc to manange lifetime of real data entry, so it's slightly slower than std::collections::LinkedList .

No runtime deps