Trait proclet::Ident

source ·
pub trait Ident: ProcMacro<Ident = Self> + Display {
    // Required methods
    fn new(string: &str, span: Self::Span) -> Self;
    fn new_raw(string: &str, span: Self::Span) -> Self;
    fn span(&self) -> Self::Span;
    fn set_span(&mut self, span: Self::Span);
}
Expand description

Ident API trait. See proc_macro::Ident.

This trait is implemented for Ident in proc_macro and proc_macro2 if the corresponding feature is enabled.

See also IdentExt.

Required Methods§

source

fn new(string: &str, span: Self::Span) -> Self

Create a new Ident with the specified span.

source

fn new_raw(string: &str, span: Self::Span) -> Self

Create a new raw identifier with the specified span.

source

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

The span of this Ident.

source

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

Set the span of this Ident.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Ident for Ident

Available on crate feature proc-macro only.
source§

fn new(string: &str, span: Self::Span) -> Self

source§

fn new_raw(string: &str, span: Self::Span) -> Self

source§

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

source§

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

source§

impl Ident for Ident

Available on crate feature proc-macro2 only.
source§

fn new(string: &str, span: Self::Span) -> Self

source§

fn new_raw(string: &str, span: Self::Span) -> Self

source§

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

source§

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

Implementors§