pub unsafe trait Pixel: Copy {
// Required method
fn matches_color_type(ct: ColorType) -> bool;
}
Expand description
Implement this trait to use a pixel type in Handle<Pixmap>::pixels()
.
§Safety
This trait is unsafe because external Pixel
implementations may lie about their
ColorType
or fail to match the alignment of the pixels stored in Handle<Pixmap>
.
Required Methods§
fn matches_color_type(ct: ColorType) -> bool
fn matches_color_type(ct: ColorType) -> bool
true
if the type matches the color type’s format.
Object Safety§
This trait is not object safe.