Expand description
§Sto
sto is a string interning crate, just like string-interner, lasso and ustr,
but maintains lifetime-bounded, pointer-sized interned strings,
and allocates memory only when needed.
- Repository, a thread-safe struct where strings are stored,
- ScopedSto, a handle to access the interned string,
- Sto, an alias of
ScopedSto<'static>, - to intern a string, see ScopedSto::intern_in,
- to get the interned string, see ScopedSto::as_str,
- to check memory footprint, see Repository::allocated_memory,
- to access the global Repository provided by feature
global, see repository(), - to intern a string in the global Repository, see Sto::from.
§Features
| Name | Default | Description |
|---|---|---|
| global | ✅ | provide a shared global Repository |
Structs§
- Repository
- A Repository used to store interned strings.
- Scoped
Sto - Represents an interned string.
Functions§
- repository
global - Returns a reference to the default global shared Repository.