pub struct SourcePosition {
    pub line: i32,
    pub column: i32,
}Expand description
Struct which represents a position in a source file.
Fields§
§line: i32Current line of the input
column: i32Current column of the input
Implementations§
Trait Implementations§
Source§impl Clone for SourcePosition
 
impl Clone for SourcePosition
Source§fn clone(&self) -> SourcePosition
 
fn clone(&self) -> SourcePosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for SourcePosition
 
impl Debug for SourcePosition
Source§impl Default for SourcePosition
 
impl Default for SourcePosition
Source§impl Display for SourcePosition
 
impl Display for SourcePosition
Source§impl Ord for SourcePosition
 
impl Ord for SourcePosition
Source§fn cmp(&self, other: &SourcePosition) -> Ordering
 
fn cmp(&self, other: &SourcePosition) -> Ordering
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 PartialEq for SourcePosition
 
impl PartialEq for SourcePosition
Source§impl PartialOrd for SourcePosition
 
impl PartialOrd for SourcePosition
Source§impl Positioner<char> for SourcePosition
 
impl Positioner<char> for SourcePosition
Source§type Position = SourcePosition
 
type Position = SourcePosition
The type which keeps track of the position
type Checkpoint = SourcePosition
Source§fn position(&self) -> SourcePosition
 
fn position(&self) -> SourcePosition
Returns the current position
Source§fn update(&mut self, token: &char)
 
fn update(&mut self, token: &char)
Updates the position given that 
token has been taken from the streamfn checkpoint(&self) -> Self::Checkpoint
fn reset(&mut self, checkpoint: Self::Checkpoint)
Source§impl Positioner<u8> for SourcePosition
 
impl Positioner<u8> for SourcePosition
Source§type Position = SourcePosition
 
type Position = SourcePosition
The type which keeps track of the position
type Checkpoint = SourcePosition
Source§fn position(&self) -> SourcePosition
 
fn position(&self) -> SourcePosition
Returns the current position
Source§fn update(&mut self, token: &u8)
 
fn update(&mut self, token: &u8)
Updates the position given that 
token has been taken from the streamfn checkpoint(&self) -> Self::Checkpoint
fn reset(&mut self, checkpoint: Self::Checkpoint)
Source§impl<'a> RangePositioner<char, &'a str> for SourcePosition
 
impl<'a> RangePositioner<char, &'a str> for SourcePosition
Source§fn update_range(&mut self, range: &&'a str)
 
fn update_range(&mut self, range: &&'a str)
Updates the position given that 
range has been taken from the streamimpl Copy for SourcePosition
impl Eq for SourcePosition
impl StructuralPartialEq for SourcePosition
Auto Trait Implementations§
impl Freeze for SourcePosition
impl RefUnwindSafe for SourcePosition
impl Send for SourcePosition
impl Sync for SourcePosition
impl Unpin for SourcePosition
impl UnwindSafe for SourcePosition
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