pub trait Surface {
type Texel;
// Required methods
fn texel(&self, x: u32, y: u32) -> Option<Self::Texel>;
fn set_texel(&mut self, x: u32, y: u32, value: Self::Texel);
fn clear(&mut self, value: Self::Texel);
fn width(&self) -> u32;
fn height(&self) -> u32;
// Provided methods
unsafe fn texel_unchecked(&self, x: u32, y: u32) -> Self::Texel { ... }
unsafe fn set_texel_unchecked(&mut self, x: u32, y: u32, value: Self::Texel) { ... }
}Expand description
So-so display surface trait for reuse purposes.