pub struct TextPosition {
pub line: u32,
pub character: u32,
}Expand description
A position in a document. character counts UTF-16 code units, which is what the
protocol speaks. The editor speaks char offsets; termesh_editor::position converts.
Fields§
§line: u32§character: u32Trait Implementations§
Source§impl Clone for TextPosition
impl Clone for TextPosition
Source§fn clone(&self) -> TextPosition
fn clone(&self) -> TextPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextPosition
Source§impl Debug for TextPosition
impl Debug for TextPosition
impl Eq for TextPosition
Source§impl Ord for TextPosition
impl Ord for TextPosition
Source§fn cmp(&self, other: &TextPosition) -> Ordering
fn cmp(&self, other: &TextPosition) -> Ordering
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 PartialEq for TextPosition
impl PartialEq for TextPosition
Source§impl PartialOrd for TextPosition
impl PartialOrd for TextPosition
impl StructuralPartialEq for TextPosition
Auto Trait Implementations§
impl Freeze for TextPosition
impl RefUnwindSafe for TextPosition
impl Send for TextPosition
impl Sync for TextPosition
impl Unpin for TextPosition
impl UnsafeUnpin for TextPosition
impl UnwindSafe for TextPosition
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