Struct source_map::Span
source · pub struct Span {
pub start: u32,
pub end: u32,
pub source_id: SourceId,
}Expand description
A start and end. Also contains trace of original source
Fields§
§start: u32§end: u32§source_id: SourceIdImplementations§
source§impl Span
impl Span
sourcepub fn is_adjacent_to(&self, other: &Self) -> bool
pub fn is_adjacent_to(&self, other: &Self) -> bool
Returns whether the end of self is the start of other
sourcepub fn union(&self, other: &Self) -> Span
pub fn union(&self, other: &Self) -> Span
Returns a new Span which starts at the start of self a ends at the end of other