pub struct CaseFoldPool { /* private fields */ }Expand description
A string pool that normalizes strings to lowercase before interning, enabling case-insensitive comparisons via cheap integer equality.
Implementations§
Source§impl CaseFoldPool
impl CaseFoldPool
Sourcepub fn intern(&mut self, s: &str) -> InternedString
pub fn intern(&mut self, s: &str) -> InternedString
Intern a string after folding to lowercase.
Sourcepub fn resolve(&self, id: InternedString) -> Option<&str>
pub fn resolve(&self, id: InternedString) -> Option<&str>
Resolve back to the canonicalized (lowercase) form.
Sourcepub fn contains(&self, s: &str) -> bool
pub fn contains(&self, s: &str) -> bool
Check whether the lowercase version of s has been interned.
Sourcepub fn inner(&self) -> &StringPool
pub fn inner(&self) -> &StringPool
Access the inner pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaseFoldPool
impl RefUnwindSafe for CaseFoldPool
impl Send for CaseFoldPool
impl Sync for CaseFoldPool
impl Unpin for CaseFoldPool
impl UnsafeUnpin for CaseFoldPool
impl UnwindSafe for CaseFoldPool
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