pub struct KeywordInterner { /* private fields */ }Expand description
Deterministic keyword interner for tests and bootstrap metadata.
Implementations§
Source§impl KeywordInterner
impl KeywordInterner
Sourcepub fn intern(&mut self, keyword: Keyword) -> KwId
pub fn intern(&mut self, keyword: Keyword) -> KwId
Interns a keyword, returning the stable id assigned by this interner.
Sourcepub fn get(&self, keyword: &Keyword) -> Option<KwId>
pub fn get(&self, keyword: &Keyword) -> Option<KwId>
Looks up an already interned keyword without interning it.
Trait Implementations§
Source§impl Clone for KeywordInterner
impl Clone for KeywordInterner
Source§fn clone(&self) -> KeywordInterner
fn clone(&self) -> KeywordInterner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeywordInterner
impl Debug for KeywordInterner
Source§impl Default for KeywordInterner
impl Default for KeywordInterner
Source§fn default() -> KeywordInterner
fn default() -> KeywordInterner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KeywordInterner
impl RefUnwindSafe for KeywordInterner
impl Send for KeywordInterner
impl Sync for KeywordInterner
impl Unpin for KeywordInterner
impl UnsafeUnpin for KeywordInterner
impl UnwindSafe for KeywordInterner
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