Punct is an single punctuation character like
Multicharacter operators like
+= are represented as two instances of
Punct with different forms of
Creates a new
Punct from the given character and spacing.
ch argument must be a valid punctuation character permitted by the
language, otherwise the function will panic.
Punct will have the default span of
which can be further configured with the
set_span method below.
Returns the value of this punctuation character as
Returns the spacing of this punctuation character, indicating whether
it's immediately followed by another
Punct in the token stream, so
they can potentially be combined into a multicharacter operator
Joint), or it's followed by some other token or whitespace (
so the operator has certainly ended.
Returns the span for this punctuation character.
Configure the span for this punctuation character.
Prints the punctuation character as a string that should be losslessly convertible back into the same character.
Auto Trait Implementations
impl !RefUnwindSafe for Punct
impl UnwindSafe for Punct
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.