pub struct Cursor { /* private fields */ }Expand description
A zero-based text position whose column is a UTF-8 byte offset.
Construction is deliberately unchecked so adapters can store a cursor
before their next text snapshot is available. apply and reveal
clamp an out-of-range line to the final logical line and round a byte inside
a UTF-8 scalar backward to its start. On non-empty lines a byte column at or
beyond the line length clamps to the final scalar; empty lines use column
zero.
Implementations§
Trait Implementations§
impl Copy for Cursor
impl Eq for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
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