pub enum Motion {
Left,
Right,
Up,
Down,
PageUp(u32),
PageDown(u32),
WordLeft,
WordRight,
LineStart,
LineEnd,
DocStart,
DocEnd,
}Expand description
A caret motion.
Variants§
Left
One character left (wraps to the end of the previous line).
Right
One character right (wraps to the start of the next line).
Up
One line up, honoring the goal column.
Down
One line down, honoring the goal column.
PageUp(u32)
Up by a page — the given number of viewport rows (from the widget’s layout; the core has no viewport). Honors the goal column; past the top lands at the document start.
PageDown(u32)
Down by a page — the given number of viewport rows. Past the bottom lands at the document end.
WordLeft
To the start of the word left of the caret.
WordRight
To the start/end of the word right of the caret.
LineStart
Smart line start: toggles between the first non-whitespace column and column 0.
LineEnd
To the end of the line.
DocStart
To the start of the document.
DocEnd
To the end of the document.
Trait Implementations§
impl Copy for Motion
impl Eq for Motion
impl StructuralPartialEq for Motion
Auto Trait Implementations§
impl Freeze for Motion
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnsafeUnpin for Motion
impl UnwindSafe for Motion
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.