lurk-elsa

Crates.iolurk-elsa
lib.rslurk-elsa
version0.1.1
sourcesrc
created_at2023-12-15 15:21:52.862631
updated_at2023-12-15 15:31:08.626206
descriptionAppend-only collections for Rust where borrows to entries can outlive insertions
homepage
repositoryhttps://github.com/manishearth/elsa
max_upload_size
id1071067
size123,525
François Garillot (huitseeker)

documentation

https://docs.rs/elsa/

README

lurk-elsa

lurk-rs Current Version License: MIT/Apache-2.0

[!IMPORTANT] This repo is a fork of https://github.com/Manishearth/elsa. It supports a crate release which only increment on the original is a sync variant of the FrozenIndexMap and FrozenIndexSet data structures, used in Lurk. This feature was PRed to upstream in https://github.com/Manishearth/elsa/pull/67 and this crate should become obsolete if it merges.

🎵 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

cargo test --examples --features indexmap
Commit count: 188

cargo fmt