Trait proclet::Punct

source ·
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§

source

fn new(ch: char, spacing: Self::Spacing) -> Self

Create a new Punct.

source

fn as_char(&self) -> char

The value of this Punct as a char

source

fn spacing(&self) -> Self::Spacing

The Spacing of this Punct.

source

fn span(&self) -> Self::Span

The span of this Punct.

source

fn set_span(&mut self, span: Self::Span)

Set the span of this Punct.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Punct for Punct

Available on crate feature proc-macro only.
source§

fn new(ch: char, spacing: Self::Spacing) -> Self

source§

fn as_char(&self) -> char

source§

fn spacing(&self) -> Self::Spacing

source§

fn span(&self) -> Self::Span

source§

fn set_span(&mut self, span: Self::Span)

source§

impl Punct for Punct

Available on crate feature proc-macro2 only.
source§

fn new(ch: char, spacing: Self::Spacing) -> Self

source§

fn as_char(&self) -> char

source§

fn spacing(&self) -> Self::Spacing

source§

fn span(&self) -> Self::Span

source§

fn set_span(&mut self, span: Self::Span)

Implementors§