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

The cursor is in the word with the specified index.

The cursor is on the left edge of the word with the specified index. For example: abc |hi, where | is the cursor.

The cursor is on the right edge of the word with the specified index. For example: abc| hi, where | is the cursor.

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]

[src]

Trait Implementations

impl Debug for CursorPosition
[src]

[src]

Formats the value using the given formatter.

impl Clone for CursorPosition
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for CursorPosition
[src]

impl PartialEq for CursorPosition
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for CursorPosition
[src]