pub trait FrameBufferBackend {
type Color: PixelColor;
// Required methods
fn set(&mut self, index: usize, color: Self::Color);
fn get(&self, index: usize) -> Self::Color;
fn nr_elements(&self) -> usize;
}
Expand description
This trait marks the requirements for backends for a
FrameBuf
.
In a basic scenario this is just some memory. But one could implement more elaborate backends which allow manipulation of the data on the fly.
Required Associated Types§
type Color: PixelColor
Required Methods§
Sourcefn nr_elements(&self) -> usize
fn nr_elements(&self) -> usize
Nr of elements in the backend