pub trait Lcd {
type Pixel: AsByteSlice + Copy;
// Required methods
fn info(&self) -> (LcdSize, usize);
fn encode(&self, rgb: RGB) -> Self::Pixel;
fn set_data(&mut self, x1y1: LcdXY, x2y2: LcdXY, data: &[u8]) -> Result<()>;
}Expand description
Primitives that an LCD must define.
Required Associated Types§
Sourcetype Pixel: AsByteSlice + Copy
type Pixel: AsByteSlice + Copy
The primitive type of the pixel data.
Required Methods§
Sourcefn info(&self) -> (LcdSize, usize)
fn info(&self) -> (LcdSize, usize)
Returns the dimensions of the LCD and size of the Pixel (stride).