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<'de> Deserialize<'de> for CCursor
impl<'de> Deserialize<'de> for CCursor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CCursor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CCursor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§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 Serialize for CCursor
impl Serialize for CCursor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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