pub struct Pos {
pub line: usize,
pub col: usize,
}
Expand description
A position in a string, specified by line and column number.
Fields§
§line: usize
Zero-indexed line number.
col: usize
Zero-indexed column number. The units of this field depend on the method that produces the
value. See StringOffsets::utf8_to_char_pos
, StringOffsets::utf8_to_utf16_pos
.
Trait Implementations§
impl Copy for Pos
impl Eq for Pos
impl StructuralPartialEq for Pos
Auto Trait Implementations§
impl Freeze for Pos
impl RefUnwindSafe for Pos
impl Send for Pos
impl Sync for Pos
impl Unpin for Pos
impl UnwindSafe for Pos
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