termion::color

Trait Color

Source
pub trait Color: Debug {
    // Required methods
    fn write_fg(&self, f: &mut Formatter<'_>) -> Result;
    fn write_bg(&self, f: &mut Formatter<'_>) -> Result;
}
Expand description

A terminal color.

Required Methods§

Source

fn write_fg(&self, f: &mut Formatter<'_>) -> Result

Write the foreground version of this color.

Source

fn write_bg(&self, f: &mut Formatter<'_>) -> Result

Write the background version of this color.

Trait Implementations§

Source§

impl<'a> Color for &'a dyn Color

Source§

fn write_fg(&self, f: &mut Formatter<'_>) -> Result

Write the foreground version of this color.
Source§

fn write_bg(&self, f: &mut Formatter<'_>) -> Result

Write the background version of this color.

Implementors§