0.3.2 |
|
---|---|
0.3.1 |
|
0.2.1 |
|
0.1.6 |
|
0.1.4 |
|
#81 in #symbol
Used in 157 crates
(15 directly)
14KB
178 lines
A global, uniqued cache of strings that is never purged. Inspired by servo/string-cache.
This module provides storage for strings that are meant to remain in use for the entire running duration of a program. Strings that are stored in this global, static cache are never evicted, and so the memory consumed by them can only ever grow.
The strings can be accessed via the Symbol
type, which acts as a pointer
to the underlying string data.
NOTE: If you're looking for a #[forbid(unsafe_code)]
attribute here, you
won't find one: symbol-pool (and its inspiration, servo/string-cache) uses
unsafe
Rust in order to store and dereference Symbol
pointers to
strings.
Dependencies
~0.4–1MB
~22K SLoC