pub trait ColorSet: Copy + 'static {
const ALL: &'static [Self];
// Required methods
fn name(self) -> &'static str;
fn index(self) -> usize;
// Provided method
fn engine_name(color: EngineColor) -> &'static str { ... }
}Expand description
The colors a game’s code draws with, by name: usually an enum, whose every name its palette must have.
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn engine_name(color: EngineColor) -> &'static str
fn engine_name(color: EngineColor) -> &'static str
The palette’s name for an engine color. By default its own
(EngineColor::name), so the palette must have text, panel
and the rest; a game whose palette calls them otherwise says so here.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".