Enum liner::CursorPosition
[−]
[src]
pub enum CursorPosition { InWord(usize), OnWordLeftEdge(usize), OnWordRightEdge(usize), InSpace(Option<usize>, Option<usize>), }
Represents the position of the cursor relative to words in the buffer.
Variants
InWord(usize)
The cursor is in the word with the specified index.
OnWordLeftEdge(usize)
The cursor is on the left edge of the word with the specified index.
For example: abc |hi
, where |
is the cursor.
OnWordRightEdge(usize)
The cursor is on the right edge of the word with the specified index.
For example: abc| hi
, where |
is the cursor.
InSpace(Option<usize>, Option<usize>)
The cursor is not in contact with any word. Each Option<usize>
specifies the index of the
closest word to the left and right, respectively, or None
if there is no word on that side.
Methods
impl CursorPosition
[src]
Trait Implementations
impl Debug for CursorPosition
[src]
impl Clone for CursorPosition
[src]
fn clone(&self) -> CursorPosition
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for CursorPosition
[src]
impl PartialEq for CursorPosition
[src]
fn eq(&self, __arg_0: &CursorPosition) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CursorPosition) -> bool
[src]
This method tests for !=
.