pub trait Pixel:
Sealed
+ Copy
+ 'static {
type Sample: Sample;
const CHANNELS: usize;
const MODEL: ColorModel;
const BYTES_PER_PIXEL: usize = _;
}Expand description
Compile-time description of one interleaved pixel layout.
Sealed: implemented only by the zero-sized marker types in this module. A buffer is branded with
a Pixel type so its channel count, sample primitive, and colour model are known statically;
codecs implement crate::EncodeImage<P> / crate::DecodeImage<P> for exactly the P they
support, making an unsupported format a compile error.
Required Associated Constants§
Sourceconst MODEL: ColorModel
const MODEL: ColorModel
The colour interpretation of those samples.
Provided Associated Constants§
Sourceconst BYTES_PER_PIXEL: usize = _
const BYTES_PER_PIXEL: usize = _
Bytes one pixel occupies in an interleaved buffer (CHANNELS * size_of::<Sample>()).
Required Associated Types§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".