pub trait ColorMapping: Into<Rgb888> {
const NONE_COLOR: Rgb888 = _;
// Required methods
fn char_to_color(c: char) -> Self;
fn color_to_char(color: Self) -> char;
}
Expand description
Mapping between char
s and colors.
See the module-level documentation for a table of implemented mappings.
Provided Associated Constants§
Sourceconst NONE_COLOR: Rgb888 = _
const NONE_COLOR: Rgb888 = _
Color used to display None
values when EG_FANCY_PANIC
is enabled.
This color must be set to a color that isn’t available in normal patterns to make it distinguishable in the output. For non grayscale colors the default value should be used.
Required Methods§
Sourcefn char_to_color(c: char) -> Self
fn char_to_color(c: char) -> Self
Converts a char into a color of type C
.
Sourcefn color_to_char(color: Self) -> char
fn color_to_char(color: Self) -> char
Converts a color of type C
into a char.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.