pub struct Position {
pub line: u32,
pub character: u32,
}Fields§
§line: u32§character: u32Implementations§
Source§impl Position
impl Position
pub fn default() -> Position
pub fn new(line: u32, character: u32) -> Position
pub fn next_char(&self) -> Position
pub fn move_after_char(&mut self, chr: char)
pub fn after_char(&self, chr: char) -> Position
pub fn prev_char(&self) -> Position
pub fn range_to(&self, end: Position) -> Range
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 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