Struct regex_syntax::ast::Position [−][src]
A single position in a regular expression.
A position encodes one half of a span, and include the byte offset, line number and column number.
Fields
offset: usizeThe absolute offset of this position, starting at 0 from the
beginning of the regular expression pattern string.
line: usizeThe line number, starting at 1.
column: usizeThe approximate column number, starting at 1.
Implementations
impl Position[src]
impl Position[src]pub fn new(offset: usize, line: usize, column: usize) -> Position[src]
Create a new position with the given information.
offset is the absolute offset of the position, starting at 0 from
the beginning of the regular expression pattern string.
line is the line number, starting at 1.
column is the approximate column number, starting at 1.
Trait Implementations
impl PartialOrd<Position> for Position[src]
impl PartialOrd<Position> for Position[src]impl StructuralEq for Position[src]
impl StructuralEq for Position[src]impl StructuralPartialEq for Position[src]
impl StructuralPartialEq for Position[src]Auto Trait Implementations
impl RefUnwindSafe for Position
impl RefUnwindSafe for Positionimpl UnwindSafe for Position
impl UnwindSafe for Position