Struct source_map::Span
source · [−]Expand description
A start and end. Also contains trace of original source
Fields
start: usize
end: usize
source_id: SourceId
Implementations
sourceimpl 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
pub fn into_line_column_span(self, on_slice: &str) -> LineColumnSpan
Trait Implementations
sourceimpl PartialEq<Span> for Span
impl PartialEq<Span> for Span
impl Eq for Span
impl StructuralEq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more