Struct xml::common::TextPosition [] [src]

pub struct TextPosition {
    pub row: u64,
    pub column: u64,
}

Represents a position inside some textual document.

Fields

row

Row, counting from 0

column

Column, counting from 0

Methods

impl TextPosition

fn new() -> TextPosition

Creates a new position initialized to the beginning of the document

fn advance(&mut self, count: u8)

Advances the position in a line

fn advance_to_tab(&mut self, width: u8)

Advances the position in a line to the next tab position

fn new_line(&mut self)

Advances the position to the beginning of the next line

Trait Implementations

impl Debug for TextPosition

fn fmt(&self, f: &mut Formatter) -> Result

impl Display for TextPosition

fn fmt(&self, f: &mut Formatter) -> Result

impl Position for TextPosition

fn position(&self) -> TextPosition

Derived Implementations

impl Eq for TextPosition

impl PartialEq for TextPosition

fn eq(&self, __arg_0: &TextPosition) -> bool

fn ne(&self, __arg_0: &TextPosition) -> bool

impl Clone for TextPosition

fn clone(&self) -> TextPosition

fn clone_from(&mut self, source: &Self)

impl Copy for TextPosition