Trait termion::color::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§