Expand description
A safe place for your strings.
asylum is a fast, lightweight string interner with automatic cleanup to prevent memory bloat.
It stores each unique string once, supports fast equality checks, and automatically removes unused strings to keep memory usage low.
Structs§
- Symbol
- A lightweight handle to an interned string.
Functions§
- capacity
- Returns the total number of slots currently allocated in the interner.
- intern
- Interns the given string slice and returns a
Symbol
representing it. - shrink_
to_ fit - Reduces the memory usage by shrinking the interner’s capacity to fit exactly the number of currently interned strings.
- size
- Returns the number of currently interned strings.