Struct intern_all::Interner
source · pub struct Interner { /* private fields */ }Expand description
A collection of interners based on their type. Can be used to intern any object that implements ToOwned. Objects of the same type are stored together in a TypedInterner
Implementations§
source§impl Interner
impl Interner
sourcepub fn i<Q: ?Sized + Eq + Hash + ToOwned>(&self, q: &Q) -> Tok<Q::Owned>where
Q::Owned: 'static + Eq + Hash + Clone + Borrow<Q> + Send + Sync,
pub fn i<Q: ?Sized + Eq + Hash + ToOwned>(&self, q: &Q) -> Tok<Q::Owned>where Q::Owned: 'static + Eq + Hash + Clone + Borrow<Q> + Send + Sync,
Intern something
sourcepub fn ev<'a, T: 'static + Eq + Hash + Clone>(
s: impl IntoIterator<Item = &'a Tok<T>>
) -> Vec<T>
pub fn ev<'a, T: 'static + Eq + Hash + Clone>( s: impl IntoIterator<Item = &'a Tok<T>> ) -> Vec<T>
Fully resolve a list of interned things. If the list is interned, use Tok::ev
sourcepub fn sweep_type<T: Eq + Hash + Clone + Send + Sync + 'static>(&self) -> usize
pub fn sweep_type<T: Eq + Hash + Clone + Send + Sync + 'static>(&self) -> usize
Sweep values of a specific type. Useful if you just constructed a large number of values of a specific type, otherwise use Interner::sweep
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Interner
impl Send for Interner
impl Sync for Interner
impl Unpin for Interner
impl UnwindSafe for Interner
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