Manishearth/elsa
Append-only collections for Rust where borrows to entries can outlive insertions
{ "createdAt": "2018-12-21T00:15:25Z", "defaultBranch": "master", "description": "Append-only collections for Rust where borrows to entries can outlive insertions", "fullName": "Manishearth/elsa", "homepage": null, "language": "Rust", "name": "elsa", "pushedAt": "2025-11-18T15:11:53Z", "stargazersCount": 264, "topics": [], "updatedAt": "2025-11-18T15:11:57Z", "url": "https://github.com/Manishearth/elsa"}🎵 Immutability never bothered me anyway 🎶
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
Section titled “Running all examples”cargo test --examples --features indexmap