[][src]Struct epd_waveshare_uart::graphics::VarDisplay

pub struct VarDisplay<'a> { /* fields omitted */ }

A variable Display without a predefined buffer

The buffer can be created as following: buffer: [DEFAULT_BACKGROUND_COLOR; WIDTH * HEIGHT]

Example:

let width = 296;
let height = 128;

let mut buffer = [DEFAULT_BACKGROUND_COLOR; 128 * 296];
let mut display = VarDisplay::new(width, height, &mut buffer);

display.set_rotation(DisplayRotation::Rotate90);

display.draw(
    Line::new(Point::new(0, 120), Point::new(0, 295))
        .stroke(Some(EpdColor::Black))
        .into_iter(),
);

Methods

impl<'a> VarDisplay<'a>[src]

pub fn new(
    width: u32,
    height: u32,
    buffer: &'a mut [EpdColor]
) -> VarDisplay<'a>
[src]

Trait Implementations

impl<'a> Display for VarDisplay<'a>[src]

impl<'a> Drawing<EpdColor> for VarDisplay<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for VarDisplay<'a>

impl<'a> Send for VarDisplay<'a>

impl<'a> Sync for VarDisplay<'a>

impl<'a> Unpin for VarDisplay<'a>

impl<'a> !UnwindSafe for VarDisplay<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.