pub struct Span {
pub start: usize,
pub end: usize,
}Expand description
Span represents a range of a piece of source code. It counts by offset, so it’s 0-based.
Fields§
§start: usizeStart offset. (Inclusive)
end: usizeEnd offset. (Exclusive)
Trait Implementations§
Source§impl SpanIgnoredEq for Span
impl SpanIgnoredEq for Span
Source§fn span_ignored_eq(&self, _: &Self) -> bool
fn span_ignored_eq(&self, _: &Self) -> bool
Compare equality of two AST nodes without respecting their spans.
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more