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 Freeze for CCursor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)