pub trait Pixel:
Copy
+ Pod
+ Zeroable
+ Send
+ Sync
+ 'static {
const MODE: PixelMode;
const BYTES: usize;
}Expand description
Re-export every public type from the color crate, including all
arithmetic helpers from color::convert.
Downstream modules within this crate can import everything they need with
a single use crate::types::*.
A typed pixel value that can be stored in a Bitmap<P> row buffer.
All implementations are Copy + Pod, enabling zero-copy row access via
bytemuck::cast_slice. BYTES must match std::mem::size_of::<Self>();
compile-time assertions in this module enforce the invariant.
Required 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.