pub struct Position<'a> {
pub filename: &'a str,
pub line: usize,
pub col: usize,
}
Expand description
A position in a source file.
Fields§
§filename: &'a str
Name of the file the position is in.
line: usize
0-indexed line number of position.
col: usize
0-indexed column number of position.
Trait Implementations§
Source§impl<'a> Ord for Position<'a>
impl<'a> Ord for Position<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for Position<'a>
impl<'a> PartialOrd for Position<'a>
impl<'a> Copy for Position<'a>
impl<'a> Eq for Position<'a>
impl<'a> StructuralPartialEq for Position<'a>
Auto Trait Implementations§
impl<'a> Freeze for Position<'a>
impl<'a> RefUnwindSafe for Position<'a>
impl<'a> Send for Position<'a>
impl<'a> Sync for Position<'a>
impl<'a> Unpin for Position<'a>
impl<'a> UnwindSafe for Position<'a>
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