pub trait PixelArray {
// Required methods
fn get(&self, index: usize) -> RGBA8;
fn width(&self) -> usize;
fn height(&self) -> usize;
fn length(&self) -> usize;
fn bytes_per_pixel() -> usize;
fn has_alpha() -> bool;
}Expand description
Trait for 2D-sized & indexed pixel storage
Required Methods§
fn get(&self, index: usize) -> RGBA8
fn width(&self) -> usize
fn height(&self) -> usize
fn length(&self) -> usize
fn bytes_per_pixel() -> usize
fn has_alpha() -> bool
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.