Trait swc_common::Spanned

source ·
pub trait Spanned {
    // Required method
    fn span(&self) -> Span;

    // Provided methods
    fn span_lo(&self) -> BytePos { ... }
    fn span_hi(&self) -> BytePos { ... }
}
Expand description

§Derive

This trait can be derived with #[derive(Spanned)].

Required Methods§

source

fn span(&self) -> Span

Get span of self.

Provided Methods§

source

fn span_lo(&self) -> BytePos

source

fn span_hi(&self) -> BytePos

Implementations on Foreign Types§

source§

impl<'a, S> Spanned for &'a S
where S: ?Sized + Spanned,

source§

fn span(&self) -> Span

source§

fn span_lo(&self) -> BytePos

source§

fn span_hi(&self) -> BytePos

source§

impl<'a, T> Spanned for Cow<'a, T>
where T: Spanned + Clone,

source§

fn span(&self) -> Span

source§

fn span_lo(&self) -> BytePos

source§

fn span_hi(&self) -> BytePos

source§

impl<S> Spanned for Option<S>
where S: Spanned,

source§

fn span(&self) -> Span

source§

fn span_lo(&self) -> BytePos

source§

fn span_hi(&self) -> BytePos

source§

impl<S> Spanned for Box<S>
where S: ?Sized + Spanned,

source§

fn span(&self) -> Span

source§

fn span_lo(&self) -> BytePos

source§

fn span_hi(&self) -> BytePos

source§

impl<S> Spanned for Rc<S>
where S: ?Sized + Spanned,

source§

fn span(&self) -> Span

source§

fn span_lo(&self) -> BytePos

source§

fn span_hi(&self) -> BytePos

Implementors§

source§

impl Spanned for Comment

source§

impl Spanned for BytePos

source§

impl Spanned for Span

source§

impl<A, B> Spanned for Either<A, B>
where A: Spanned, B: Spanned,

source§

impl<S> Spanned for Arc<S>
where S: ?Sized + Spanned,