pub struct SourcePos {
pub byte: usize,
pub line: usize,
pub col: usize,
}
Expand description
Indicates a character/token position in the original source.
Fields§
§byte: usize
The byte offset since the start of parsing.
line: usize
The line offset since the start of parsing, useful for error messages.
col: usize
The column offset since the start of parsing, useful for error messages.
Implementations§
Trait Implementations§
impl Copy for SourcePos
impl Eq for SourcePos
impl StructuralPartialEq for SourcePos
Auto Trait Implementations§
impl Freeze for SourcePos
impl RefUnwindSafe for SourcePos
impl Send for SourcePos
impl Sync for SourcePos
impl Unpin for SourcePos
impl UnwindSafe for SourcePos
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