Struct xml::common::TextPosition
source · [−]Expand description
Represents a position inside some textual document.
Fields
row: u64
Row, counting from 0
column: u64
Column, counting from 0
Implementations
sourceimpl 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
sourceimpl Clone for TextPosition
impl Clone for TextPosition
sourcefn clone(&self) -> TextPosition
fn clone(&self) -> TextPosition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TextPosition
impl Debug for TextPosition
sourceimpl Display for TextPosition
impl Display for TextPosition
sourceimpl PartialEq<TextPosition> for TextPosition
impl PartialEq<TextPosition> for TextPosition
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &TextPosition) -> bool
fn ne(&self, other: &TextPosition) -> bool
This method tests for !=
.
sourceimpl Position for TextPosition
impl Position for TextPosition
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more