Struct intern_all::instance::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 sweep_t<T: Internable>(&self) -> usize
pub fn sweep_t<T: Internable>(&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
sourcepub fn sweep(&self) -> usize
pub fn sweep(&self) -> usize
Sweep all values not referenced by anything other than the interner.
sourcepub fn iv<T: Internable>(
&self,
s: impl IntoIterator<Item = T>
) -> Tok<Vec<Tok<T>>>
pub fn iv<T: Internable>( &self, s: impl IntoIterator<Item = T> ) -> Tok<Vec<Tok<T>>>
Intern a list and its elements. See also Interner::ibv
sourcepub fn ibv<'a, Q>(
&self,
s: impl IntoIterator<Item = &'a Q>
) -> Tok<Vec<Tok<Q::Owned>>>
pub fn ibv<'a, Q>( &self, s: impl IntoIterator<Item = &'a Q> ) -> Tok<Vec<Tok<Q::Owned>>>
Intern a list of borrowed items. See also Interner::iv
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