pub struct CrossTerm { /* private fields */ }Expand description
A mocked version of CrossTerm, useful for testing.
Implementations§
Source§impl CrossTerm
impl CrossTerm
Sourcepub const fn get_output(&self) -> &Vec<String>
pub const fn get_output(&self) -> &Vec<String>
Get a representation of the rendered output.
Sourcepub fn is_colors_enabled(&self, colors: Colors) -> bool
pub fn is_colors_enabled(&self, colors: Colors) -> bool
Are colors enabled.
Sourcepub const fn is_reverse(&self) -> bool
pub const fn is_reverse(&self) -> bool
Does the current style attributes contained reverse.
Sourcepub const fn is_underline(&self) -> bool
pub const fn is_underline(&self) -> bool
Does the current style attributes contained underlined.
Sourcepub const fn get_position(&self) -> (u16, u16)
pub const fn get_position(&self) -> (u16, u16)
Get the current cursor position.
Trait Implementations§
Source§impl MockableTui for CrossTerm
impl MockableTui for CrossTerm
fn get_color_mode(&self) -> ColorMode
fn reset(&mut self) -> Result<(), DisplayError>
fn flush(&mut self) -> Result<(), DisplayError>
fn print(&mut self, s: &str) -> Result<(), DisplayError>
fn set_color(&mut self, colors: Colors) -> Result<(), DisplayError>
fn set_dim(&mut self, dim: bool) -> Result<(), DisplayError>
fn set_underline(&mut self, dim: bool) -> Result<(), DisplayError>
fn set_reverse(&mut self, dim: bool) -> Result<(), DisplayError>
fn get_size(&self) -> Size
fn move_to_column(&mut self, x: u16) -> Result<(), DisplayError>
fn move_next_line(&mut self) -> Result<(), DisplayError>
fn start(&mut self) -> Result<(), DisplayError>
fn end(&mut self) -> Result<(), DisplayError>
Auto Trait Implementations§
impl Freeze for CrossTerm
impl RefUnwindSafe for CrossTerm
impl Send for CrossTerm
impl Sync for CrossTerm
impl Unpin for CrossTerm
impl UnwindSafe for CrossTerm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Tui for Twhere
T: MockableTui,
impl<T> Tui for Twhere
T: MockableTui,
Source§fn get_color_mode(&self) -> ColorMode
fn get_color_mode(&self) -> ColorMode
Get the supported color mode.
Source§fn reset(&mut self) -> Result<(), DisplayError>
fn reset(&mut self) -> Result<(), DisplayError>
Reset the terminal interface to a default state. Read more
Source§fn flush(&mut self) -> Result<(), DisplayError>
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>
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>
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>
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>
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>
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 move_to_column(&mut self, x: u16) -> Result<(), DisplayError>
fn move_to_column(&mut self, x: u16) -> Result<(), DisplayError>
Move the cursor position
x characters from the start of the line. Read moreSource§fn move_next_line(&mut self) -> Result<(), DisplayError>
fn move_next_line(&mut self) -> Result<(), DisplayError>
Move the cursor to the next line. Read more