Expand description
String interning for Gentoo-related crates.
Provides a flexible interning system for reducing memory usage when processing large numbers of repeated strings.
§Components
Interner: Trait for interning strings into compact keysInterned<I>: An interned string key parameterized by interner typeDefaultInterner: Default interner based on feature flags
§Features
| Feature | DefaultInterner | Key Type | Behavior |
|---|---|---|---|
interner (default) | GlobalInterner | u32 | Process-global deduplication, Copy |
no interner | NoInterner | Box<str> | No deduplication, Clone only |
§Example
use gentoo_interner::{Interned, DefaultInterner};
let interned = Interned::<DefaultInterner>::intern("amd64");
assert_eq!(interned.resolve(), "amd64");Structs§
- Global
Interner - Global process-wide
Internerbacked bylasso::ThreadedRodeo. - Interned
- An interned string key parameterized by
InternertypeI. - NoInterner
- Non-interning fallback that allocates each string as a
Box<str>.
Traits§
- Interner
- Trait for interning strings into compact keys.
Type Aliases§
- Default
Interner - Default interner type based on feature configuration.