Trait ExtendedColour

Source
pub trait ExtendedColour {
    // Provided method
    fn name_colour(colour: &str) -> Option<Self>
       where Self: Sized + FromStr { ... }
}
Expand description

An extended colour

This trait is implemented for all the extended colours

Provided Methods§

Source

fn name_colour(colour: &str) -> Option<Self>
where Self: Sized + FromStr,

Returns the name of the colour

§Examples

    let colour = "#d3d3d3";
    let name = Black::name_colour(colour).unwrap();
    assert_eq!(Black::LightGray, name);

Implementors§