pub struct Position { /* private fields */ }
Expand description
Represents a position in the input data.
Positions are 0-indexed, meaning that the first character of each line has 0 as column number. The same goes for the line number.
Implementations§
Trait Implementations§
Source§impl Ord for Position
§Warning
Positions can be compared toghether only if they come from the same input
unit. If they do not, then inconsistencies may occur.
impl Ord for Position
§Warning
Positions can be compared toghether only if they come from the same input unit. If they do not, then inconsistencies may occur.
§Panics
In debug mode, this function may panic if the two positions are not from the same input unit. In release mode, this function does not panic.
Source§impl PartialOrd for Position
§Warning
Positions can be compared toghether only if they come from the same input
unit. If they do not, then inconsistencies may occur.
impl PartialOrd for Position
§Warning
Positions can be compared toghether only if they come from the same input unit. If they do not, then inconsistencies may occur.
§Panics
In debug mode, this function may panic if the two positions are not from the same input unit. In release mode, this function does not panic.
impl Copy for Position
impl Eq for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin 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