imageproc::map

Trait WithChannel

Source
pub trait WithChannel<C: Primitive>: Pixel {
    type Pixel: Pixel<Subpixel = C>;
}
Expand description

The type obtained by replacing the channel type of a given Pixel type. The output type must have the same name of channels as the input type, or several algorithms will produce incorrect results or panic.

Required Associated Types§

Source

type Pixel: Pixel<Subpixel = C>

The new pixel type.

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.

Implementations on Foreign Types§

Source§

impl<T, U> WithChannel<U> for Luma<T>
where T: Primitive, U: Primitive,

Source§

impl<T, U> WithChannel<U> for LumaA<T>
where T: Primitive, U: Primitive,

Source§

impl<T, U> WithChannel<U> for Rgb<T>
where Rgb<T>: Pixel<Subpixel = T>, Rgb<U>: Pixel<Subpixel = U>, T: Primitive, U: Primitive,

Source§

type Pixel = Rgb<U>

Source§

impl<T, U> WithChannel<U> for Rgba<T>
where Rgba<T>: Pixel<Subpixel = T>, Rgba<U>: Pixel<Subpixel = U>, T: Primitive, U: Primitive,

Implementors§