pub struct Point {
pub byte: usize,
pub row: usize,
pub column: usize,
}Expand description
A single position in the source text, expressed both as a byte offset and as a zero-indexed (row, column) pair.
The column is a byte offset within its row, matching tree-sitter’s
tree_sitter::Point semantics.
Fields§
§byte: usizeZero-indexed byte offset of the position within the whole source text.
row: usizeZero-indexed row (line number).
column: usizeZero-indexed column (byte offset within row).
Implementations§
Trait Implementations§
impl Copy for Point
impl Eq for Point
Source§impl Ord for Point
impl Ord for Point
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Point
impl PartialOrd for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnsafeUnpin for Point
impl UnwindSafe for Point
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