#data-structure #map #cache #arena #frozen

elsa

Append-only collections for Rust where borrows to entries can outlive insertions

13 releases (stable)

1.4.0 Mar 6, 2021
1.3.2 May 27, 2019
1.1.0 Apr 23, 2019
1.0.1 Mar 29, 2019
0.1.3 Dec 28, 2018

#86 in Data structures

Download history 590/week @ 2021-04-08 517/week @ 2021-04-15 376/week @ 2021-04-22 310/week @ 2021-04-29 380/week @ 2021-05-06 423/week @ 2021-05-13 401/week @ 2021-05-20 367/week @ 2021-05-27 354/week @ 2021-06-03 340/week @ 2021-06-10 376/week @ 2021-06-17 417/week @ 2021-06-24 445/week @ 2021-07-01 566/week @ 2021-07-08 448/week @ 2021-07-15 334/week @ 2021-07-22

1,861 downloads per month
Used in 9 crates (5 directly)

MIT/Apache

21KB
493 lines

elsa

Build Status Current Version License: MIT/Apache-2.0

This crate provides various "frozen" collections.

These are append-only collections where references to entries can be held on to even across insertions. This is safe because these collections only support storing data that's present behind some indirection -- i.e. String, Vec<T>, Box<T>, etc, and they only yield references to the data behind the allocation (&str, &[T], and &T respectively)

The typical use case is having a global cache of strings or other data which the rest of the program borrows from.

Running all examples

cargo test --examples --features indexmap

lib.rs:

This crate provides various "Frozen" collections.

These are append-only collections where references to entries can be held on to even across insertions. This is safe because these collections only support storing data that's present behind some indirection -- i.e. String, Vec<T>, Box<T>, etc, and they only yield references to the data behind the allocation (&str, &[T], and &T respectively)

The typical use case is having a global cache of strings or other data which the rest of the program borrows from.

Dependencies

~105KB