Screen

Trait Screen 

Source
pub trait Screen {
    type C: Cell;

    // Required methods
    fn cell(&self, row: u16, col: u16) -> Option<&Self::C>;
    fn hide_cursor(&self) -> bool;
    fn cursor_position(&self) -> (u16, u16);
}
Expand description

A trait representing a pseudo-terminal screen.

Implementing this trait allows for backends other than vt100 to be used with the PseudoTerminal widget.

Required Associated Types§

Source

type C: Cell

The type of cell this screen contains

Required Methods§

Source

fn cell(&self, row: u16, col: u16) -> Option<&Self::C>

Returns the cell at the given location if it exists.

Source

fn hide_cursor(&self) -> bool

Returns whether the terminal should be hidden

Source

fn cursor_position(&self) -> (u16, u16)

Returns cursor position of screen.

The return value is expected to be (row, column)

Implementations on Foreign Types§

Source§

impl Screen for Screen

Source§

type C = Cell

Source§

fn cell(&self, row: u16, col: u16) -> Option<&Self::C>

Source§

fn hide_cursor(&self) -> bool

Source§

fn cursor_position(&self) -> (u16, u16)

Implementors§