pub trait TerminalWriter: Clone {
    // Required methods
    fn stdout(no_color: bool) -> Self;
    fn stderr(no_color: bool) -> Self;
    fn is_tty(&self) -> bool;
    fn write(&mut self, s: impl AsRef<str>) -> Result<()>;
    fn rewrite(&mut self, s: impl AsRef<str>) -> Result<()>;
    fn write_line(&self, s: impl AsRef<str>) -> Result<()>;
}
Expand description

Trait defining the main methods to write messages to a terminal stream.

Required Methods§

source

fn stdout(no_color: bool) -> Self

source

fn stderr(no_color: bool) -> Self

source

fn is_tty(&self) -> bool

source

fn write(&mut self, s: impl AsRef<str>) -> Result<()>

source

fn rewrite(&mut self, s: impl AsRef<str>) -> Result<()>

source

fn write_line(&self, s: impl AsRef<str>) -> Result<()>

Object Safety§

This trait is not object safe.

Implementors§