Trait srclang::parser::span::Spanning

pub trait Spanning: Send + Sync + Sized {
    // Required method
    fn span(&self) -> Range<Location>;

    // Provided methods
    fn byte_range(&self) -> Range<usize> { ... }
    fn line_col_range(&self) -> Range<(usize, usize)> { ... }
    fn overlap(&self, other: &ByteOrLineColOrCoord) -> bool { ... }
}

Required Methods

fn span(&self) -> Range<Location>

Provided Methods

fn byte_range(&self) -> Range<usize>

fn line_col_range(&self) -> Range<(usize, usize)>

fn overlap(&self, other: &ByteOrLineColOrCoord) -> bool

Object Safety

This trait is not object safe.

Implementations on Foreign Types

impl Spanning for &Range<Location>

fn span(&self) -> Range<Location>

Implementors

impl<T: Sized + Send + Sync> Spanning for Spanned<T>