Skip to main content

Mixable

Trait Mixable 

Source
pub trait Mixable: Color {
    // Provided method
    fn mix(&self, alpha: f64) -> CompsitableColor<'_, Self> { ... }
}
Expand description

The trait for any color that can composite with other color

Provided Methods§

Source

fn mix(&self, alpha: f64) -> CompsitableColor<'_, Self>

Introduce alpha channel to the color

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Color + Sized> Mixable for T