Module arret_runtime::intern [−][src]
Interned symbols
This uses a fixed 8 byte representation for interned symbol. They are associated with a
particular Interner
instance which can return the original str
name of the symbol.
Interned symbols from the same Interner
can be compared directly without a reference to
the Interner
instance.
Symbol names of 8 bytes or less are encoded directly in the InternedSym`` instance without storing the name in the
Interner`. They are padded with a constant invalid UTF-8 sequence so
the length of the inline name can be recovered.
The encoding for names larger than 8 bytes uses an index in to a Vec
stored in the
Interner
. The indexed representation is invalid UTF-8 so it cannot collide with a valid
symbol name.
Structs
Interner | |
RawGlobalNames |
Traits
AsInterner | Type that can be converted to an |
Unions
InternedSym |