Trait colorz::OptionalColor

source ·
pub trait OptionalColor: Seal {
    type Color: WriteColor;

    // Required method
    fn get(self) -> Option<Self::Color>;

    // Provided method
    fn color_kind(self) -> ColorKind { ... }
}
Expand description

An optional color type

Required Associated Types§

source

type Color: WriteColor

The color type

Required Methods§

source

fn get(self) -> Option<Self::Color>

Get the color value

Provided Methods§

source

fn color_kind(self) -> ColorKind

Get the color value

Implementations on Foreign Types§

source§

impl<C: OptionalColor> OptionalColor for Option<C>

§

type Color = <C as OptionalColor>::Color

source§

fn get(self) -> Option<Self::Color>

Implementors§