atom_str 0.2.0

A string interning library.
Documentation
  • Coverage
  • 76.47%
    13 out of 17 items documented0 out of 16 items with examples
  • Size
  • Source code size: 23.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 815.5 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ErisianArchitect/atom_str
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ErisianArchitect

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));