pub struct Op { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (
proc_macro
#38356)
An Op
is an operator like +
or -
, and only represents one character.
Operators like +=
are represented as two instance of Op
with different
forms of Spacing
returned.
🔬 This is a nightly-only experimental API. (
proc_macro
#38356)
Creates a new Op
from the given character and spacing.
The returned Op
will have the default span of Span::call_site()
which can be further configured with the set_span
method below.
🔬 This is a nightly-only experimental API. (
proc_macro
#38356)
Returns the character this operation represents, for example '+'
🔬 This is a nightly-only experimental API. (
proc_macro
#38356)
Returns the spacing of this operator, indicating whether it's a joint
operator with more operators coming next in the token stream or an
Alone
meaning that the operator has ended.
🔬 This is a nightly-only experimental API. (
proc_macro
#38356)
Returns the span for this operator character
🔬 This is a nightly-only experimental API. (
proc_macro
#38356)
Configure the span for this operator's character
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more