Trait ColModify

Source
pub trait ColModify: Copy {
    // Required methods
    fn foreground(&self, rgb24: Option<Rgb24>) -> Option<Rgb24>;
    fn background(&self, rgb24: Option<Rgb24>) -> Option<Rgb24>;

    // Provided method
    fn compose<Other>(self, other: Other) -> ColModifyCompose<Self, Other>
       where Other: ColModify { ... }
}

Required Methods§

Source

fn foreground(&self, rgb24: Option<Rgb24>) -> Option<Rgb24>

Source

fn background(&self, rgb24: Option<Rgb24>) -> Option<Rgb24>

Provided Methods§

Source

fn compose<Other>(self, other: Other) -> ColModifyCompose<Self, Other>
where Other: ColModify,

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.

Implementors§

Source§

impl ColModify for ColModifyDefaultForeground

Source§

impl ColModify for ColModifyIdentity

Source§

impl<F> ColModify for ColModifyMap<F>
where F: Fn(Rgb24) -> Rgb24 + Copy,

Source§

impl<F> ColModify for F
where F: Fn(Option<Rgb24>) -> Option<Rgb24> + Copy,

Source§

impl<Inner, Outer> ColModify for ColModifyCompose<Inner, Outer>
where Inner: ColModify, Outer: ColModify,