Struct cl_structures::intern::string_interner::StringInterner
source · pub struct StringInterner<'a> { /* private fields */ }
Expand description
A string interner hands out Interned copies of each unique string given to it.
Implementations§
source§impl StringInterner<'static>
impl StringInterner<'static>
sourcepub fn global() -> &'static Self
pub fn global() -> &'static Self
Gets a reference to a global string interner whose Interned strings are 'static
source§impl<'a> StringInterner<'a>
impl<'a> StringInterner<'a>
sourcepub fn new(arena: DroplessArena<'a>) -> Self
pub fn new(arena: DroplessArena<'a>) -> Self
Creates a new StringInterner backed by the provided DroplessArena
sourcepub fn get_or_insert(&'a self, value: &str) -> Interned<'a, str>
pub fn get_or_insert(&'a self, value: &str) -> Interned<'a, str>
Trait Implementations§
source§impl Debug for StringInterner<'_>
impl Debug for StringInterner<'_>
impl<'a> Send for StringInterner<'a>
impl<'a> Sync for StringInterner<'a>
Auto Trait Implementations§
impl<'a> !Freeze for StringInterner<'a>
impl<'a> !RefUnwindSafe for StringInterner<'a>
impl<'a> Unpin for StringInterner<'a>
impl<'a> UnwindSafe for StringInterner<'a>
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