pub unsafe trait Component {
// Required method
fn is_valid(format: Format<'_>) -> bool;
}Expand description
A trait for possible pixel components.
§Safety
Implementing this trait allows retrieving slices of pixel data from the frame for the target type, so the target type must be valid for the given format.
Required Methods§
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.