Crate move_symbol_pool

source ·
Expand description

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.

Re-exports

Modules