pub trait Console: Debug {
Show 22 methods fn read_event(&mut self) -> Result<Event, Error>; fn clear_screen(&self); fn clear_current_line(&self); fn flush(&self) -> Result<(), Error>; fn hide_cursor(&self); fn show_cursor(&self); fn set_bg_color(&self, color: Rgb); fn reset_bg_color(&self); fn set_fg_color(&self, color: Rgb); fn reset_fg_color(&self); fn to_alternate_screen(&self); fn to_main_screen(&self); fn clear_all(&self); fn size(&self) -> ConsoleSize; fn text_area_size(&self) -> ConsoleSize; fn middle_of_screen_line_number(&self) -> LineNumber; fn bottom_of_screen_line_number(&self) -> LineNumber; fn get_cursor_index_from_mouse_event(
        &self,
        mouse_event: MouseEvent,
        x_offset: u8
    ) -> Position; fn set_cursor_position_in_text_area(
        &self,
        position: &Position,
        row_prefix_length: u8
    ); fn set_cursor_position_anywhere(&self, position: &Position); fn set_cursor_as_steady_bar(&self); fn set_cursor_as_steady_block(&self);
}

Required Methods

Read the next event from the console input.termion

Errors

Will return an error if an event can’t be read from the console input.

Errors

Will return an error if the terminal can’t be flushed

Implementors