Trait Pixel

Source
pub trait Pixel: Zero + Clone {
    const CHANNEL_TYPE: PixelType;
    const NUM_CHANNELS: usize;
    const STRIDE: usize = _;
    const CHANNEL_STRIDE: usize = _;
}

Required Associated Constants§

Provided Associated Constants§

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 Pixel for f32

Source§

const CHANNEL_TYPE: PixelType = PixelType::Float

Source§

const NUM_CHANNELS: usize = 1usize

Source§

impl Pixel for u32

Source§

const CHANNEL_TYPE: PixelType = PixelType::Uint

Source§

const NUM_CHANNELS: usize = 1usize

Source§

impl Pixel for f16

Source§

const CHANNEL_TYPE: PixelType = PixelType::Half

Source§

const NUM_CHANNELS: usize = 1usize

Implementors§

Source§

impl Pixel for Rgba

Source§

const CHANNEL_TYPE: PixelType = PixelType::Half

Source§

const NUM_CHANNELS: usize = 4usize

Source§

const CHANNEL_STRIDE: usize = 2usize