#[repr(C)]pub enum CursorAffinity {
Leading = 0,
Trailing = 1,
}Expand description
Represents the logical position of the cursor between two grapheme clusters or at the start/end of the text.
Variants§
Leading = 0
The cursor is at the leading edge of the character (left in LTR, right in RTL).
Trailing = 1
The cursor is at the trailing edge of the character (right in LTR, left in RTL).
Trait Implementations§
Source§impl Clone for CursorAffinity
impl Clone for CursorAffinity
Source§fn clone(&self) -> CursorAffinity
fn clone(&self) -> CursorAffinity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CursorAffinity
impl Debug for CursorAffinity
Source§impl Hash for CursorAffinity
impl Hash for CursorAffinity
Source§impl Ord for CursorAffinity
impl Ord for CursorAffinity
Source§fn cmp(&self, other: &CursorAffinity) -> Ordering
fn cmp(&self, other: &CursorAffinity) -> Ordering
1.21.0 · 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 CursorAffinity
impl PartialEq for CursorAffinity
Source§impl PartialOrd for CursorAffinity
impl PartialOrd for CursorAffinity
impl Copy for CursorAffinity
impl Eq for CursorAffinity
impl StructuralPartialEq for CursorAffinity
Auto Trait Implementations§
impl Freeze for CursorAffinity
impl RefUnwindSafe for CursorAffinity
impl Send for CursorAffinity
impl Sync for CursorAffinity
impl Unpin for CursorAffinity
impl UnwindSafe for CursorAffinity
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more