pub struct Interner<T>{ /* private fields */ }
Available on crate feature
blob
only.Expand description
A hastable based interner that allows
Implementations§
source§impl<T> Interner<T>
impl<T> Interner<T>
sourcepub fn new_for_token_source<S>(before: &S, after: &S) -> Interner<T>where
S: TokenSource<Token = T>,
pub fn new_for_token_source<S>(before: &S, after: &S) -> Interner<T>where
S: TokenSource<Token = T>,
Create an Interner with an intial capacity calculated by calling
estimate_tokens
methods of before
and after
sourcepub fn num_tokens(&self) -> u32
pub fn num_tokens(&self) -> u32
Returns to total number of distinct tokens currently interned.
sourcepub fn erase_tokens_after(&mut self, first_erased_token: Token)
pub fn erase_tokens_after(&mut self, first_erased_token: Token)
Erases first_erased_token
and any tokens interned afterwards from the interner.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Interner<T>
impl<T> RefUnwindSafe for Interner<T>where
T: RefUnwindSafe,
impl<T> Send for Interner<T>where
T: Send,
impl<T> Sync for Interner<T>where
T: Sync,
impl<T> Unpin for Interner<T>where
T: Unpin,
impl<T> UnwindSafe for Interner<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more