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§