Module symbol

Source
Expand description

An “interner” is a data structure that associates values with usize tags and allows bidirectional lookup; i.e., given a value, one can easily find the type, and vice versa.

Modules§

kw
This module contains all the defined keyword Symbols.
sym
This module contains all the defined non-keyword Symbols.

Structs§

ByteSymbol
Like Symbol, but for byte strings. ByteSymbol is used less widely, so it has fewer operations defined than Symbol.
Ident
IdentPrinter
The most general type to print identifiers.
Interner 🔒
InternerInner 🔒
MacroRulesNormalizedIdent
An newtype around Ident that calls Ident::normalize_to_macro_rules on construction.
Symbol
An interned UTF-8 string.
SymbolIndex 🔒

Constants§

PREDEFINED_SYMBOLS_COUNT
The number of predefined symbols; this is the first index for extra pre-interned symbols in an Interner created via Interner::with_extra_symbols.
STDLIB_STABLE_CRATES
Symbols for crates that are part of the stable standard library: std, core, alloc, and proc_macro.
SYMBOL_DIGITS_BASE 🔒

Functions§

used_keywords
Collect all the keywords in a given edition into a vector.