pub struct Span {
pub start: usize,
pub end: usize,
}Expand description
Source span representing a character range in the original input.
Offsets are character indices (the lexer scans the source as a Vec<char>),
not byte offsets — they diverge for multibyte UTF-8. Use
Node::source_text to recover the source slice; it converts these
character indices to byte offsets before slicing.
Fields§
§start: usize§end: usizeImplementations§
Trait Implementations§
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