pub struct Interner { /* private fields */ }Expand description
Implements naive string internment.
Requires O(n) heap space to store unique strings, in return for O(1) symbol equality checks and faster symbol hashing.
Does NOT garbage collect interned strings: the memory is intentionally leaked for the duration of the program. This is only suitable for short-lived processes (e.g. compilers).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Interner
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