pub struct Location {
pub bytes: usize,
pub lines: usize,
pub column: usize,
}Expand description
A position in the parser input byte stream.
This struct is returned from the location() method and gives you the position of the last parsed byte in the input stream.
It is useful when printing error messages or if you want to track location of parsed elements in the XML text.
Fields§
§bytes: usizeByte position in the input stream.
lines: usizeHow many lines have been parsed. Lines are separated by the newline character.
column: usizeHow many bytes after the last newline character.
Implementations§
Trait Implementations§
impl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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