Struct Position
struct Position { ... }
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
0from 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
fn new(offset: usize, line: usize, column: usize) -> PositionCreate a new position with the given information.
offsetis the absolute offset of the position, starting at0from the beginning of the regular expression pattern string.lineis the line number, starting at1.columnis the approximate column number, starting at1.
impl Clone for Position
fn clone(self: &Self) -> Position
impl Copy for Position
impl Debug for Position
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Position
impl Freeze for Position
impl Ord for Position
fn cmp(self: &Self, other: &Position) -> Ordering
impl PartialEq for Position
fn eq(self: &Self, other: &Position) -> bool
impl PartialOrd for Position
fn partial_cmp(self: &Self, other: &Position) -> Option<Ordering>
impl RefUnwindSafe for Position
impl Send for Position
impl StructuralPartialEq for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
impl<T> Any for Position
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Position
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Position
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Position
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Position
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Position
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Position
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Position
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Position
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>