[−][src]Struct string_interner::backend::SimpleBackend
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.
- Query: Efficiency of interned string look-up given a symbol.
- Memory: The number of allocations and overall memory consumption.
Rating varies between bad, ok and good.
Scenario | Rating |
---|---|
Fill | bad |
Query | good |
Memory | bad: many small allocations |
Trait Implementations
impl<S> Backend<S> for SimpleBackend<S> where
S: Symbol,
[src]
S: Symbol,
fn with_capacity(cap: usize) -> Self
[src]
unsafe fn intern(&mut self, string: &str) -> (InternedStr, S)
[src]
fn resolve(&self, symbol: S) -> Option<&str>
[src]
unsafe fn intern_static(&mut self, string: &'static str) -> (InternedStr, S)
[src]
impl<S> Clone for SimpleBackend<S> where
S: Symbol,
[src]
S: Symbol,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug> Debug for SimpleBackend<S>
[src]
impl<S> Default for SimpleBackend<S>
[src]
impl<S> Eq for SimpleBackend<S> where
S: Symbol,
[src]
S: Symbol,
impl<'a, S> IntoIterator for &'a SimpleBackend<S> where
S: Symbol,
[src]
S: Symbol,
type Item = (S, &'a str)
The type of the elements being iterated over.
type IntoIter = Iter<'a, S>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<S> PartialEq<SimpleBackend<S>> for SimpleBackend<S> where
S: Symbol,
[src]
S: Symbol,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,