Struct string_interner::backend::SimpleBackend [−][src]
pub struct SimpleBackend<S> { /* fields omitted */ }
Expand description
A simple backend that stores a separate allocation for every interned string.
Use this if you can afford many small allocations and if you want to have especially decent performance for look-ups when the string interner is already filled to some extend.
Usage
- Fill: Efficiency of filling an empty string interner.
- Resolve: Efficiency of interned string look-up given a symbol.
- Allocations: The number of allocations performed by the backend.
- Footprint: The total heap memory consumed by the backend.
Rating varies between bad, ok and good.
Scenario | Rating |
---|---|
Fill | bad |
Resolve | good |
Allocations | bad |
Footprint | bad |
Supports get_or_intern_static | no |
Send + Sync | yes |
Trait Implementations
Creates a new backend for the given capacity. Read more
Interns the given string and returns its interned ref and symbol. Read more
Shrink backend capacity to fit interned symbols exactly.
Resolves the given symbol to its original string contents.
Resolves the given symbol to its original string contents. Read more
Interns the given static string and returns its interned ref and symbol. Read more
Auto Trait Implementations
impl<S> RefUnwindSafe for SimpleBackend<S>
impl<S> Send for SimpleBackend<S>
impl<S> Sync for SimpleBackend<S>
impl<S> Unpin for SimpleBackend<S>
impl<S> UnwindSafe for SimpleBackend<S>
Blanket Implementations
Mutably borrows from an owned value. Read more