pub struct Position {
pub line: usize,
pub column: usize,
}Expand description
A place in source text: a line and a column, both counted from 1.
The column counts characters (Unicode scalar values) from the start of the line.
let position = predicator_rs::Position { line: 1, column: 7 };
assert_eq!(position.line, 1);
assert_eq!(position.column, 7);Fields§
§line: usizeThe line, counted from 1.
column: usizeThe column, counted from 1.
Trait Implementations§
impl Copy for Position
impl Eq for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Forget for Position
impl Freeze for Position
impl Move for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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