pub struct Point {
pub row: u32,
pub col: u32,
}Expand description
A buffer-space position: zero-based row, and a byte col within that
row’s text (the \n is not part of the row).
Columns are byte offsets, not cells and not grapheme clusters — cell columns
are DisplayPoint territory, and grapheme-cluster navigation is a
deliberate non-goal. Ordering is row-major, so Points compare in document
order.
Fields§
§row: u32Zero-based line index.
col: u32Byte offset within the row (excludes the trailing \n).
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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.