Type Alias source_map::Span

source ·
pub type Span = BaseSpan<()>;

Aliased Type§

struct Span {
    pub start: u32,
    pub end: u32,
    pub source: (),
}

Fields§

§start: u32§end: u32§source: ()

Implementations§

source§

impl Span

source

pub fn is_adjacent_to(&self, other: impl Into<Start>) -> bool

Returns whether the end of self is the start of other

source

pub fn union(&self, end: impl Into<End>) -> Span

Returns a new Span which starts at the start of self a ends at the end of other

source

pub fn get_end(&self) -> End

source

pub fn get_start(&self) -> Start

source

pub fn with_source(self, source: SourceId) -> SpanWithSource

Trait Implementations§

source§

impl Debug for Span

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more