Trait SetSpan

Source
pub trait SetSpan: GetSpan + Sized {
    // Required method
    fn set_span(&mut self, span: Span);

    // Provided method
    fn set_spaned(self, span: Span) -> Self { ... }
}
Expand description

General implementations of TokenTree::set_span

Required Methods§

Source

fn set_span(&mut self, span: Span)

Provided Methods§

Source

fn set_spaned(self, span: Span) -> Self

Like {let mut x = this; x.set_span(span); x}

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 SetSpan for TokenTree

Source§

fn set_span(&mut self, span: Span)

Source§

impl SetSpan for Group

Source§

fn set_span(&mut self, span: Span)

Source§

impl SetSpan for Ident

Source§

fn set_span(&mut self, span: Span)

Source§

impl SetSpan for Literal

Source§

fn set_span(&mut self, span: Span)

Source§

impl SetSpan for Punct

Source§

fn set_span(&mut self, span: Span)

Source§

impl SetSpan for Span

Source§

fn set_span(&mut self, span: Span)

Source§

impl<T: SetSpan> SetSpan for &mut T

Source§

fn set_span(&mut self, span: Span)

Implementors§