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

Methods

impl Position
[src]

Trait Implementations

impl Debug for Position
[src]

Formats the value using the given formatter. Read more

impl Clone for Position
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Position
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Position

impl Sync for Position