pub trait TokenColorExt {
// Required methods
fn to_ratatui(&self, theme: &Theme) -> Color;
fn from_ratatui(color: Color) -> Option<TokenColor>;
}Expand description
Resolve a TokenColor (the lossless RGB-or-named color carried by
ViewTokenStyle) and produce a ratatui Color ready for the
renderer. Named strings try (in order) an ANSI name, then
"Indexed:N" for 256-color values, then a theme-key lookup
against theme. Unknown strings fall through to Color::Reset
so a typo in a plugin can’t make text disappear.
Required Methods§
fn to_ratatui(&self, theme: &Theme) -> Color
fn from_ratatui(color: Color) -> Option<TokenColor>
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.