pub struct LineBytePosition { /* private fields */ }
Implementations§
Source§impl LineBytePosition
impl LineBytePosition
Sourcepub fn new(line_number: u64, byte_number: u64) -> Self
pub fn new(line_number: u64, byte_number: u64) -> Self
Creates a new position where line_number
and byte_number
are both starting from 1
Sourcepub fn line_number(&self) -> u64
pub fn line_number(&self) -> u64
The line number where the error occurred starting from 0
Sourcepub fn byte_number(&self) -> u64
pub fn byte_number(&self) -> u64
The byte number where the error occurred starting from 0
Trait Implementations§
Source§impl Clone for LineBytePosition
impl Clone for LineBytePosition
Source§fn clone(&self) -> LineBytePosition
fn clone(&self) -> LineBytePosition
Returns a copy 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 LineBytePosition
impl Debug for LineBytePosition
Source§impl Hash for LineBytePosition
impl Hash for LineBytePosition
Source§impl PartialEq for LineBytePosition
impl PartialEq for LineBytePosition
impl Copy for LineBytePosition
impl Eq for LineBytePosition
impl StructuralPartialEq for LineBytePosition
Auto Trait Implementations§
impl Freeze for LineBytePosition
impl RefUnwindSafe for LineBytePosition
impl Send for LineBytePosition
impl Sync for LineBytePosition
impl Unpin for LineBytePosition
impl UnwindSafe for LineBytePosition
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