pub struct Position { /* private fields */ }Expand description
A position.
Characters in a text file can be organizes in a virtual grid in order to easily find characters or parsing errors inside the file. Each file can be divided in multiple lines separated by line feed (U+000A) or carriage return + line feed (U+000D + U+000A).
To find a character then you need just the index of the line containing it (the first line has index 0)
and the character index inside thai line (also called the column).
Implementations§
Trait Implementations§
Source§impl Ord for Position
impl Ord for Position
Source§impl PartialOrd for Position
impl PartialOrd for Position
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 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