pub trait ImageAxisIndex: Copy {
// Required methods
fn to_image_axis_index(self) -> Option<u32>;
fn clamp_image_axis_index(self, max: u32) -> u32;
}Expand description
Provides methods for converting a type to image axis index used for locating pixels in an image.
Required Methods§
Sourcefn to_image_axis_index(self) -> Option<u32>
fn to_image_axis_index(self) -> Option<u32>
Converts the value to an image axis index, returning None if the conversion fails.
Sourcefn clamp_image_axis_index(self, max: u32) -> u32
fn clamp_image_axis_index(self, max: u32) -> u32
Clamps the value to a valid image axis index within the bounds of the image corresponding axis.
Lower bound is always 0, upper bound is max.
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.