#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

#2534 in Data structures

Download history 20/week @ 2024-07-22 178/week @ 2024-07-29 28/week @ 2024-08-05 30/week @ 2024-08-12 73/week @ 2024-08-19 28/week @ 2024-08-26 30/week @ 2024-09-02 33/week @ 2024-09-09 28/week @ 2024-09-16 44/week @ 2024-09-23 32/week @ 2024-09-30 8/week @ 2024-10-07 42/week @ 2024-10-14 23/week @ 2024-10-21 32/week @ 2024-10-28 26/week @ 2024-11-04

124 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