Skip to main content

SpanExt

Trait SpanExt 

Source
pub trait SpanExt {
    // Provided methods
    fn with_span(self, span: impl Into<Span>) -> Spanned<Self>
       where Self: Sized { ... }
    fn spanned(self, span: impl Into<Span>) -> Spanned<Self>
       where Self: Sized { ... }
    fn with_dummy_span(self) -> Spanned<Self>
       where Self: Sized { ... }
    fn into_with_dummy_span<T>(self) -> Spanned<T>
       where Self: Into<T> { ... }
}

Provided Methods§

Source

fn with_span(self, span: impl Into<Span>) -> Spanned<Self>
where Self: Sized,

Source

fn spanned(self, span: impl Into<Span>) -> Spanned<Self>
where Self: Sized,

Same as Self::with_span, but can avoid name collisions

Source

fn with_dummy_span(self) -> Spanned<Self>
where Self: Sized,

Source

fn into_with_dummy_span<T>(self) -> Spanned<T>
where Self: Into<T>,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> SpanExt for T