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