Struct gluon_base::symbol::Symbols
source · pub struct Symbols { /* private fields */ }
Expand description
Symbols
is a bidirectional mapping between Symbol
s and their name as represented in a
source file.
Used to make identifiers within a single module point to the same symbol
Implementations§
source§impl Symbols
impl Symbols
pub fn new() -> Symbols
pub fn simple_symbol<N>(&mut self, name: N) -> Symbol
sourcepub fn symbol<N>(&mut self, name: SymbolData<N>) -> Symbol
pub fn symbol<N>(&mut self, name: SymbolData<N>) -> Symbol
Looks up the symbol for name
or creates a new symbol if it does not exist
pub fn contains_name<N>(&mut self, name: N) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Symbols
impl Send for Symbols
impl Sync for Symbols
impl Unpin for Symbols
impl UnwindSafe for Symbols
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