pub struct SourcePosition {
pub line: usize,
pub column: usize,
pub offset: usize,
}Expand description
A position in source text (1-indexed line and column).
Fields§
§line: usizeLine number (1-indexed).
column: usizeColumn number (1-indexed, in characters not bytes).
offset: usizeByte offset from start of input.
Implementations§
Trait Implementations§
Source§impl Clone for SourcePosition
impl Clone for SourcePosition
Source§fn clone(&self) -> SourcePosition
fn clone(&self) -> SourcePosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourcePosition
impl Debug for SourcePosition
Source§impl PartialEq for SourcePosition
impl PartialEq for SourcePosition
impl Copy for SourcePosition
impl Eq for SourcePosition
impl StructuralPartialEq for SourcePosition
Auto Trait Implementations§
impl Freeze for SourcePosition
impl RefUnwindSafe for SourcePosition
impl Send for SourcePosition
impl Sync for SourcePosition
impl Unpin for SourcePosition
impl UnwindSafe for SourcePosition
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