ByteSymbol in rustc_span::symbol - Rust (original) (raw)
pub struct ByteSymbol(SymbolIndex);Expand description
Like Symbol, but for byte strings. ByteSymbol is used less widely, so it has fewer operations defined than Symbol.
Avoid this except for things like deserialization of previously serialized symbols, and testing. Use intern instead.
Maps a string to its interned representation.
Like Symbol::as_str.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes