Skip to main content

IntoColor

Trait IntoColor 

Source
pub(crate) trait IntoColor<Other> {
    // Required method
    fn into_color(&self) -> Other;
}
Expand description

Copy-based conversions to target pixel types using FromColor.

Required Methods§

Source

fn into_color(&self) -> Other

Constructs a pixel of the target type and converts this pixel into it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<O, S> IntoColor<O> for S
where O: Pixel + FromColor<S>,