pub struct Span {
pub start: u32,
pub end: u32,
}Expand description
Span represents a range of a piece of source code. It counts by byte offset, so it’s 0-based.
Adapted from saphyr’s Span (see the note in scanner.rs),
with line/column markers replaced by byte offsets.
Offsets are u32 (matching oxc convention); sources larger than 4 GiB are
rejected by the parser up front.
Fields§
§start: u32Start offset. (Inclusive)
end: u32End offset. (Exclusive)
Implementations§
Trait Implementations§
impl Copy for Span
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 UnsafeUnpin 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