pub struct Ident {
pub name: Symbol,
pub span: Span,
}
Maps an interned string to an identifier with an empty syntax context.
Maps a string to an identifier with an empty syntax context.
Replace lo
and hi
with those from span
, but keep hygiene context.
"Normalize" ident for use in comparisons using "item hygiene".
Identifiers with same string value become same if they came from the same "modern" macro
(e.g., macro
item, but not macro_rules
item) and stay different if they came from
different "modern" macros.
Technically, this operation strips all non-opaque marks from ident's syntactic context.
"Normalize" ident for use in comparisons using "local variable hygiene".
Identifiers with same string value become same if they came from the same non-transparent
macro (e.g., macro
or macro_rules!
items) and stay different if they came from different
non-transparent macros.
Technically, this operation strips all transparent marks from ident's syntactic context.
Returns true
if the token is a keyword used in the language.
Returns true
if the token is a keyword reserved for possible future use.
Returns true
if the token is either a special identifier or a keyword.
A keyword or reserved identifier that can be used as a path segment.
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more