pmutil

Trait SpanExt

Source
pub trait SpanExt: Copy {
    // Required method
    fn into_pm2_span(self) -> Span;

    // Provided methods
    fn new_ident<S>(self, s: S) -> Ident
       where S: AsRef<str> { ... }
    fn as_token<Token>(self) -> Token
       where Token: FromSpan { ... }
}
Expand description

Extension trait for Span and syn::Span.

Required Methods§

Provided Methods§

Source

fn new_ident<S>(self, s: S) -> Ident
where S: AsRef<str>,

Source

fn as_token<Token>(self) -> Token
where Token: FromSpan,

Creates Token from self.

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 SpanExt for Span

Source§

fn into_pm2_span(self) -> Self

Implementors§