atom_str

Crates.ioatom_str
lib.rsatom_str
version0.2.0
created_at2025-08-04 01:08:06.539994+00
updated_at2025-08-04 01:20:00.335676+00
descriptionA string interning library.
homepage
repositoryhttps://github.com/ErisianArchitect/atom_str
max_upload_size
id1780206
size23,500
Null (ErisianArchitect)

documentation

README

A simple library for interning strings.

Atoms are string singletons that live for the lifetime of the program. For any given string that is made into an Atom, there will only be one instance of that Atom allocated for the program. After an Atom is created, it can not be destroyed.

let atom_a = Atom::new("single instance");
let atom_b = Atom::new("single instance");
assert_eq!(Atom::ptr_eq(&atom_a, &atom_b));
Commit count: 0

cargo fmt