Struct mortal::terminal::Cursor [] [src]

pub struct Cursor {
    pub line: usize,
    pub column: usize,
}

Represents the cursor position in a terminal device

Fields

Index of line in terminal, beginning at 0.

Index of column in terminal, beginning at 0.

Methods

impl Cursor
[src]

[src]

Returns the position of the next cell within a terminal of the given size.

Returns None if this cursor position represents the last cell.

[src]

Returns the position of the previous cell within a terminal of the given size.

Returns None if this cursor position represents the first cell.

[src]

Returns a Cursor pointing to the first cell, i.e. (0, 0).

[src]

Returns a Cursor pointing to the last cell of a screen of the given size.

[src]

Returns whether the cursor is out of bounds of the given size.

Trait Implementations

impl Copy for Cursor
[src]

impl Clone for Cursor
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Cursor
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for Cursor
[src]

[src]

Returns the "default value" for a type. Read more

impl Eq for Cursor
[src]

impl PartialEq for Cursor
[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 From<(usize, usize)> for Cursor
[src]

[src]

Returns a Cursor value from a (line, column) or (y, x) tuple.

Auto Trait Implementations

impl Send for Cursor

impl Sync for Cursor