Struct mediawiki_parser::Position
[−]
[src]
pub struct Position { pub offset: usize, pub line: usize, pub col: usize, }
Represents a position in the source document.
The PartialEq
implementation allows for a "any" position (all zero), which is
equal to any other position. This is used to reduce clutter in tests, where
a default Position ("{}") can be used where the actual representation is irrelevant.
Fields
offset: usize
line: usize
col: usize
Methods
impl Position
[src]
pub fn new(offset: usize, slocs: &[SourceLine]) -> Self
[src]
pub fn any_position() -> Self
[src]
Trait Implementations
impl Debug for Position
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Position
[src]
fn clone(&self) -> Position
[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