Struct Position

pub struct Position { pub line: usize, pub column: usize }

The line and column that an error occured.

Fields

line: usize

The first line is line 0.

column: usize

The first column is column 0.

Implementations

impl Position

fn from_offset(offset: usize, input: &str) -> Self

Trait Implementations

impl Clone for Position

fn clone(&self) -> Self

impl Copy for Position

impl Debug for Position

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for Position

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl PartialEq for Position

fn eq(&self, other: &Self) -> bool

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

impl<T> Any for Position where T: 'static + ?Sized,

impl<T> Borrow<T> for Position where T: ?Sized,

impl<T> BorrowMut<T> for Position where T: ?Sized,

impl<T> CloneToUninit for Position where T: Clone,

impl<T> From<T> for Position

impl<T> ToOwned for Position where T: Clone,

impl<T> ToString for Position where T: Display + ?Sized,

impl<T, U> Into<U> for Position where U: From<T>,

impl<T, U> TryFrom<U> for Position where U: Into<T>,

impl<T, U> TryInto<U> for Position where U: TryFrom<T>,