1//! _🎵 Immutability never bothered me anyway 🎶_
2//!
3//! This crate provides various "Frozen" collections.
4//!
5//! These are append-only collections where references to entries can be held
6//! on to even across insertions. This is safe because these collections only
7//! support storing data that's present behind some indirection -- i.e. `String`,
8//! `Vec<T>`, `Box<T>`, etc, and they only yield references to the data behind the
9//! allocation (`&str`, `&[T]`, and `&T` respectively)
10//!
11//! The typical use case is having a global cache of strings or other data which the rest of the program borrows from.
12
13pub mod map;
14pub mod vec;
15
16#[cfg(feature = "indexmap")]
17pub mod index_map;
18#[cfg(feature = "indexmap")]
19pub mod index_set;
20
21pub mod sync;
22
23pub use map::{FrozenBTreeMap, FrozenMap};
24pub use vec::FrozenVec;
25
26#[cfg(feature = "indexmap")]
27pub use index_map::FrozenIndexMap;
28#[cfg(feature = "indexmap")]
29pub use index_set::FrozenIndexSet;
30