Struct display::CrossTerm

source ·
pub struct CrossTerm { /* private fields */ }
Expand description

A thin wrapper over the Crossterm library.

Implementations§

source§

impl CrossTerm

source

pub fn new() -> Self

Create a new instance.

Trait Implementations§

source§

impl Debug for CrossTerm

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Tui for CrossTerm

source§

fn get_color_mode(&self) -> ColorMode

Get the supported color mode.
source§

fn reset(&mut self) -> Result<(), DisplayError>

Reset the terminal interface to a default state. Read more
source§

fn flush(&mut self) -> Result<(), DisplayError>

Flush the contents printed to the terminal interface. Read more
source§

fn print(&mut self, s: &str) -> Result<(), DisplayError>

Print text to the terminal interface. Read more
source§

fn set_color(&mut self, colors: Colors) -> Result<(), DisplayError>

Set the color attribute of text printed to the terminal interface. Read more
source§

fn set_dim(&mut self, dim: bool) -> Result<(), DisplayError>

Set the dimmed style attribute of text printed to the terminal interface. Read more
source§

fn set_underline(&mut self, underline: bool) -> Result<(), DisplayError>

Set the underlined style attribute of text printed to the terminal interface. Read more
source§

fn set_reverse(&mut self, reverse: bool) -> Result<(), DisplayError>

Set the reversed style attribute of text printed to the terminal interface. Read more
source§

fn get_size(&self) -> Size

Get the number of columns and rows of the terminal interface.
source§

fn move_to_column(&mut self, x: u16) -> Result<(), DisplayError>

Move the cursor position x characters from the start of the line. Read more
source§

fn move_next_line(&mut self) -> Result<(), DisplayError>

Move the cursor to the next line. Read more
source§

fn start(&mut self) -> Result<(), DisplayError>

Start the terminal interface interactions. Read more
source§

fn end(&mut self) -> Result<(), DisplayError>

End the terminal interface interactions. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.