Struct xml::common::TextPosition
[−]
[src]
pub struct TextPosition { pub row: u64, pub column: u64, }
Represents a position inside some textual document.
Fields
row: u64
Row, counting from 0
column: u64
Column, counting from 0
Methods
impl TextPosition
[src]
fn new() -> TextPosition
[src]
Creates a new position initialized to the beginning of the document
fn advance(&mut self, count: u8)
[src]
Advances the position in a line
fn advance_to_tab(&mut self, width: u8)
[src]
Advances the position in a line to the next tab position
fn new_line(&mut self)
[src]
Advances the position to the beginning of the next line
Trait Implementations
impl Copy for TextPosition
[src]
impl Clone for TextPosition
[src]
fn clone(&self) -> TextPosition
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for TextPosition
[src]
fn eq(&self, __arg_0: &TextPosition) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TextPosition) -> bool
[src]
This method tests for !=
.
impl Eq for TextPosition
[src]
impl Debug for TextPosition
[src]
impl Display for TextPosition
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Position for TextPosition
[src]
fn position(&self) -> TextPosition
[src]
Returns the current position or a position corresponding to the object.