Trait PunctExt

Source
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§

Source

fn with_span(ch: char, spacing: Self::Spacing, span: Self::Span) -> Self

Create a new Punct with a custom Span.

Source

fn set_spacing(&mut self, spacing: Self::Spacing)

Set the spacing of this Punct.

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.

Implementations on Foreign Types§

Source§

impl PunctExt for Punct

Available on crate feature proc-macro only.
Source§

impl PunctExt for Punct

Available on crate feature proc-macro2 only.

Implementors§