pub trait BackendImage<'a, P: 'a> {
type Iterator: Iterator<Item = &'a P>;
// Required methods
unsafe fn pixel_unsafe(&self, x: u32, y: u32) -> &P;
fn width(&self) -> u32;
fn height(&self) -> u32;
fn pixels(&'a self) -> Self::Iterator;
}Expand description
Trait to generalize images to be displayed on the backend.
Currently implemented for Canvas and Sprite.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".