Struct rio_api::parser::LineBytePosition
source · 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<LineBytePosition> for LineBytePosition
impl PartialEq<LineBytePosition> for LineBytePosition
source§fn eq(&self, other: &LineBytePosition) -> bool
fn eq(&self, other: &LineBytePosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.