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 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 for TextPosition
impl PartialEq for TextPosition
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 StructuralPartialEq for TextPosition
Auto Trait Implementations§
impl Freeze for TextPosition
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