pub struct CCursor {
pub index: usize,
pub prefer_next_row: bool,
}
Expand description
Character cursor.
The default cursor is zero.
Fields§
§index: usize
Character offset (NOT byte offset!).
prefer_next_row: bool
If this cursors sits right at the border of a wrapped row break (NOT paragraph break) do we prefer the next row? This is almost always what you want, except for when explicitly clicking the end of a row or pressing the end key.
Implementations§
Trait Implementations§
source§impl AddAssign<usize> for CCursor
impl AddAssign<usize> for CCursor
source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moresource§impl PartialEq for CCursor
impl PartialEq for CCursor
Two CCursor
s are considered equal if they refer to the same character boundary,
even if one prefers the start of the next row.
source§impl SubAssign<usize> for CCursor
impl SubAssign<usize> for CCursor
source§fn sub_assign(&mut self, rhs: usize)
fn sub_assign(&mut self, rhs: usize)
Performs the
-=
operation. Read moreimpl Copy for CCursor
Auto Trait Implementations§
impl RefUnwindSafe for CCursor
impl Send for CCursor
impl Sync for CCursor
impl Unpin for CCursor
impl UnwindSafe for CCursor
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