#[repr(C)]pub enum SelectionStep {
Character = 0,
Word = 1,
Line = 2,
VisualLine = 3,
Document = 4,
}Expand description
Granularity of cursor movement or selection expansion.
Combined with SelectionDirection, determines how far a cursor moves
or a selection expands. Reused for navigation, deletion, and visual
selection — a single code path for word boundaries etc.
Variants§
Character = 0
One grapheme cluster (arrow keys, Backspace, Delete)
Word = 1
One word boundary (Ctrl+arrow, Ctrl+Backspace, Ctrl+Delete)
Line = 2
To line boundary (Home/End)
VisualLine = 3
One visual line up/down (Up/Down arrows)
Document = 4
To document boundary (Ctrl+Home/End)
Trait Implementations§
Source§impl Clone for SelectionStep
impl Clone for SelectionStep
Source§fn clone(&self) -> SelectionStep
fn clone(&self) -> SelectionStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SelectionStep
impl Debug for SelectionStep
Source§impl Hash for SelectionStep
impl Hash for SelectionStep
Source§impl PartialEq for SelectionStep
impl PartialEq for SelectionStep
Source§fn eq(&self, other: &SelectionStep) -> bool
fn eq(&self, other: &SelectionStep) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SelectionStep
impl Eq for SelectionStep
impl StructuralPartialEq for SelectionStep
Auto Trait Implementations§
impl Freeze for SelectionStep
impl RefUnwindSafe for SelectionStep
impl Send for SelectionStep
impl Sync for SelectionStep
impl Unpin for SelectionStep
impl UnsafeUnpin for SelectionStep
impl UnwindSafe for SelectionStep
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