[−][src]Struct string_interner::backend::StringBackend
An interner backend that appends all interned strings together.
Note
Implementation inspired by CAD97's research
project strena
.
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 | good |
Resolve | bad |
Allocations | good |
Footprint | good |
Supports get_or_intern_static | no |
Send + Sync | yes |
Trait Implementations
impl<S> Backend<S> for StringBackend<S> where
S: Symbol,
[src]
S: Symbol,
pub fn with_capacity(cap: usize) -> Self
[src]
pub fn intern(&mut self, string: &str) -> S
[src]
pub fn resolve(&self, symbol: S) -> Option<&str>
[src]
pub unsafe fn resolve_unchecked(&self, symbol: S) -> &str
[src]
pub fn intern_static(&mut self, string: &'static str) -> S
[src]
impl<S: Clone> Clone for StringBackend<S>
[src]
pub fn clone(&self) -> StringBackend<S>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug> Debug for StringBackend<S>
[src]
impl<S> Default for StringBackend<S>
[src]
impl<S> Eq for StringBackend<S> where
S: Symbol,
[src]
S: Symbol,
impl<'a, S> IntoIterator for &'a StringBackend<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?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl<S> PartialEq<StringBackend<S>> for StringBackend<S> where
S: Symbol,
[src]
S: Symbol,
Auto Trait Implementations
impl<S> RefUnwindSafe for StringBackend<S>
[src]
impl<S> Send for StringBackend<S>
[src]
impl<S> Sync for StringBackend<S>
[src]
impl<S> Unpin for StringBackend<S>
[src]
impl<S> UnwindSafe for StringBackend<S>
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,