#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

#2304 in Data structures

Download history 33/week @ 2024-03-04 31/week @ 2024-03-11 44/week @ 2024-03-18 67/week @ 2024-03-25 66/week @ 2024-04-01 31/week @ 2024-04-08 37/week @ 2024-04-15 41/week @ 2024-04-22 34/week @ 2024-04-29 30/week @ 2024-05-06 33/week @ 2024-05-13 30/week @ 2024-05-20 24/week @ 2024-05-27 35/week @ 2024-06-03 38/week @ 2024-06-10 29/week @ 2024-06-17

127 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