pub trait PunctExt: ProcMacroExt<PunctExt = Self> + Punct + Parse<Self::TokenTree> + IntoTokens<Self::TokenTree> + ToTokens<Self::TokenTree> + ToTokenStream<Self::TokenStream> {
// Provided methods
fn with_span(ch: char, spacing: Self::Spacing, span: Self::Span) -> Self { ... }
fn set_spacing(&mut self, spacing: Self::Spacing) { ... }
}
Expand description
Extensions for Punct
.
This trait is implemented for Punct
in proc_macro
and proc_macro2
if the
corresponding feature is enabled.
Provided Methods§
sourcefn with_span(ch: char, spacing: Self::Spacing, span: Self::Span) -> Self
fn with_span(ch: char, spacing: Self::Spacing, span: Self::Span) -> Self
Create a new Punct
with a custom Span
.
sourcefn set_spacing(&mut self, spacing: Self::Spacing)
fn set_spacing(&mut self, spacing: Self::Spacing)
Set the spacing of this Punct
.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
impl PunctExt for Punct
Available on crate feature
proc-macro
only.impl PunctExt for Punct
Available on crate feature
proc-macro2
only.