pub trait WinconStream {
    // Required methods
    fn set_colors(
        &mut self,
        fg: Option<AnsiColor>,
        bg: Option<AnsiColor>
    ) -> Result<()>;
    fn get_colors(&self) -> Result<(Option<AnsiColor>, Option<AnsiColor>)>;
}
Expand description

Extend std::io::Write with wincon styling

Generally, you will want to use Console instead

Required Methods§

source

fn set_colors( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor> ) -> Result<()>

Change the foreground/background

A common pitfall is to forget to flush writes to stdout before setting new text attributes.

source

fn get_colors(&self) -> Result<(Option<AnsiColor>, Option<AnsiColor>)>

Get the current foreground/background colors

Implementations on Foreign Types§

source§

impl WinconStream for Stderr

source§

impl WinconStream for File

source§

impl WinconStream for Stdout

source§

impl<'s> WinconStream for StdoutLock<'s>

source§

impl<'s> WinconStream for StderrLock<'s>

Implementors§