Struct cranelift_isle::lexer::Pos
source · pub struct Pos {
pub file: usize,
pub offset: usize,
pub line: usize,
pub col: usize,
}
Expand description
A source position.
Fields§
§file: usize
This source position’s file.
Indexes into Lexer::filenames
early in the compiler pipeline, and
later into TypeEnv::filenames
once we get into semantic analysis.
offset: usize
This source position’s byte offset in the file.
line: usize
This source position’s line number in the file.
col: usize
This source position’s column number in the file.
Implementations§
Trait Implementations§
source§impl Ord for Pos
impl Ord for Pos
source§impl PartialOrd<Pos> for Pos
impl PartialOrd<Pos> for Pos
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Pos
impl Eq for Pos
impl StructuralEq for Pos
impl StructuralPartialEq for Pos
Auto Trait Implementations§
impl RefUnwindSafe for Pos
impl Send for Pos
impl Sync for Pos
impl Unpin for Pos
impl UnwindSafe for Pos
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