anstyle_wincon

Trait WinconStream

source
pub trait WinconStream {
    // Required method
    fn write_colored(
        &mut self,
        fg: Option<AnsiColor>,
        bg: Option<AnsiColor>,
        data: &[u8],
    ) -> Result<usize>;
}
Expand description

Extend std::io::Write with wincon styling

Required Methods§

source

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

Write colored text to the stream

Implementations on Foreign Types§

source§

impl WinconStream for Vec<u8>

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for File

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for Stderr

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for StderrLock<'_>

Available on Windows only.
source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for Stdout

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for StdoutLock<'_>

Available on Windows only.
source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for dyn Write

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for dyn Write + Send

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl WinconStream for dyn Write + Send + Sync

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl<T: WinconStream + ?Sized> WinconStream for &mut T

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

source§

impl<T: WinconStream + ?Sized> WinconStream for Box<T>

source§

fn write_colored( &mut self, fg: Option<AnsiColor>, bg: Option<AnsiColor>, data: &[u8], ) -> Result<usize>

Implementors§