pub trait DetectColors {
// Required method
fn available_colors(&mut self) -> Result<u16>;
}Expand description
Types that allow detection of the colors they support.
Required Methods§
Sourcefn available_colors(&mut self) -> Result<u16>
fn available_colors(&mut self) -> Result<u16>
How many ANSI colors are supported (from 8 to 256)?
Beware: the information given isn’t authoritative, it’s infered through escape codes or the
value of TERM, more colors may be available.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".