pub struct Position {
pub line: usize,
pub column: usize,
pub offset: usize,
}Expand description
Represents a position in source code with line, column, and absolute offset.
Positions use 1-based indexing for line and column numbers to match conventional text editor behavior.
Fields§
§line: usizeLine number (1-based)
column: usizeColumn number (1-based)
offset: usizeAbsolute character offset from the beginning of the source (0-based)
Implementations§
Trait Implementations§
impl Copy for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)