pub trait Punct: ProcMacro<Punct = Self> + Display {
// Required methods
fn new(ch: char, spacing: Self::Spacing) -> Self;
fn as_char(&self) -> char;
fn spacing(&self) -> Self::Spacing;
fn span(&self) -> Self::Span;
fn set_span(&mut self, span: Self::Span);
}
Expand description
Punct
API trait. See proc_macro::Punct
.
This trait is implemented for Punct
in proc_macro
and proc_macro2
if the
corresponding feature is enabled.
See also PunctExt
.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.