Struct xml::common::TextPosition
source · pub struct TextPosition {
pub row: u64,
pub column: u64,
}
Expand description
Represents a position inside some textual document.
Fields§
§row: u64
Row, counting from 0
column: u64
Column, counting from 0
Implementations§
source§impl TextPosition
impl TextPosition
sourcepub fn new() -> TextPosition
pub fn new() -> TextPosition
Creates a new position initialized to the beginning of the document
sourcepub fn advance_to_tab(&mut self, width: u8)
pub fn advance_to_tab(&mut self, width: u8)
Advances the position in a line to the next tab position
Trait Implementations§
source§impl Clone for TextPosition
impl Clone for TextPosition
source§fn clone(&self) -> TextPosition
fn clone(&self) -> TextPosition
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 TextPosition
impl Debug for TextPosition
source§impl Display for TextPosition
impl Display for TextPosition
source§impl PartialEq<TextPosition> for TextPosition
impl PartialEq<TextPosition> for TextPosition
source§fn eq(&self, other: &TextPosition) -> bool
fn eq(&self, other: &TextPosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Position for TextPosition
impl Position for TextPosition
source§fn position(&self) -> TextPosition
fn position(&self) -> TextPosition
Returns the current position or a position corresponding to the object.
impl Copy for TextPosition
impl Eq for TextPosition
impl StructuralEq for TextPosition
impl StructuralPartialEq for TextPosition
Auto Trait Implementations§
impl RefUnwindSafe for TextPosition
impl Send for TextPosition
impl Sync for TextPosition
impl Unpin for TextPosition
impl UnwindSafe for TextPosition
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