pub trait DynColor: Sealed {
// Required methods
fn fmt_ansi_fg(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
fn fmt_ansi_bg(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
fn fmt_raw_ansi_fg(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
fn fmt_raw_ansi_bg(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
}Expand description
A trait describing a runtime-configurable color which can displayed using FgDynColorDisplay
or BgDynColorDisplay. If your color will be known at compile time it
is recommended you avoid this.
Required Methods§
Sourcefn fmt_ansi_fg(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_ansi_fg(&self, f: &mut Formatter<'_>) -> Result<(), Error>
A function to output a ANSI code to a formatter to set the foreground to this color
Sourcefn fmt_ansi_bg(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_ansi_bg(&self, f: &mut Formatter<'_>) -> Result<(), Error>
A function to output a ANSI code to a formatter to set the background to this color