pub trait ColorMapping<C> {
// Required methods
fn char_to_color(c: char) -> C;
fn color_to_char(color: C) -> char;
}
Expand description
Mapping between char
s and colors.
See the module-level documentation for a table of implemented mappings.
Required Methods§
Sourcefn char_to_color(c: char) -> C
fn char_to_color(c: char) -> C
Converts a char into a color of type C
.
Sourcefn color_to_char(color: C) -> char
fn color_to_char(color: C) -> 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.