Struct rustc_ap_rustc_span::symbol::SymbolStr [−][src]
pub struct SymbolStr { /* fields omitted */ }Expand description
An alternative to Symbol, useful when the chars within the symbol need to
be accessed. It deliberately has limited functionality and should only be
used for temporary values.
Because the interner outlives any thread which uses this type, we can
safely treat string which points to interner data, as an immortal string,
as long as this type never crosses between threads.
Trait Implementations
This impl means that if ss is a SymbolStr:
*ssis astr;&*ssis a&str(andmatch &*ss { ... }is a common pattern).&ss as &stris a&str, which means that&sscan be passed to a function expecting a&str.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V