#immutability #freeze #thaw #no-std #debugging #data

nightly no-std freezable

A library for immutable data

8 releases

0.1.8 Mar 19, 2023
0.1.7 Mar 19, 2023

#2286 in Data structures

Download history 4/week @ 2024-02-17 4/week @ 2024-02-24 28/week @ 2024-03-09 5/week @ 2024-03-16 47/week @ 2024-03-30 10/week @ 2024-04-06

57 downloads per month

MIT license

24KB
717 lines

freezable

freezable is a simple library for freezing data in Rust.

Objects which can be frozen implement the Freezable trait, which provides a freeze method. This returns a Frozen<T>, which wraps the frozen type. The Frozen<T> type implements all the comparison traits that T implements, as well as Index, Clone, and Debug, if the inner type implements them.

Why use this library?

The primary motivation for this library was frozen versions of HashMap and HashSet which support Hash. This allows them to be used as keys in other HashMaps and HashSets.

No runtime deps

Features