Trait framing::video::ByteChannels [] [src]

pub unsafe trait ByteChannels: Sized {
    type Channels: AsRef<[u8]> + AsMut<[u8]> + Default + From<Self> + Into<Self>;
    fn width() -> usize;
}

Describes a kind of pixel that is made up of a finite number of channels, each one byte long.

Associated Types

The type that represents the collection of channels.

Unless you know better, this type should probably be [u8; N], where N is the number of channels in each pixel.

Required Methods

The number of channels in each pixel.

For example, RGB might have three channels per pixel, and RGBA might have four channels per pixel. This should match the length of the Channels type, unless you enjoy breaking perfectly good code.

Implementors