Skip to main content

ChannelMap

Trait ChannelMap 

Source
pub trait ChannelMap<const N: usize>: 'static {
    const INDICES: [usize; N];
}
Expand description

Maps all N channels to their storage indices.

INDICES contains the storage position of each logical channel in logical order. For RGB layouts the first three are R, G, B. For perceptual spaces with an OFFSET the color channels begin at OFFSET and alpha occupies the remaining slot.

Required Associated Constants§

Source

const INDICES: [usize; N]

BackingStore positions of all N channels in logical order.

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 ChannelMap<3> for Bgr

Source§

impl ChannelMap<3> for Rgb

Source§

impl ChannelMap<3> for Ycbcr

Source§

impl ChannelMap<3> for Ycrcb

Source§

impl<A: AlphaState> ChannelMap<2> for LumaA<A>

Source§

impl<A: AlphaState> ChannelMap<4> for Abgr<A>

Source§

impl<A: AlphaState> ChannelMap<4> for Argb<A>

Source§

impl<A: AlphaState> ChannelMap<4> for Bgra<A>

Source§

impl<A: AlphaState> ChannelMap<4> for Rgba<A>

Source§

impl<W: Illuminant, const OFFSET: usize> ChannelMap<4> for LCh<W, OFFSET>

Source§

impl<W: Illuminant, const OFFSET: usize> ChannelMap<4> for Lab<W, OFFSET>

Source§

impl<const OFFSET: usize> ChannelMap<4> for Oklab<OFFSET>

Source§

impl<const OFFSET: usize> ChannelMap<4> for Oklch<OFFSET>