[][src]Struct rpi_memory_display::MemoryDisplayBuffer

pub struct MemoryDisplayBuffer { /* fields omitted */ }

A display buffer suitable for use with MemoryDisplay::update().

Implementations

impl MemoryDisplayBuffer[src]

pub fn new(width: usize, height: u8) -> Self[src]

Creates a new buffer.

pub fn fill(&mut self, value: Pixel)[src]

Set all pixels in buffer to value.

pub fn set_pixel(&mut self, x: usize, y: u8, value: Pixel)[src]

Sets the pixel at the given co-ordinates. Set value true for white, false for black.

Panics

Panics if (x, y) is out of the bounds (width, height).

pub fn get_pixel(&self, x: usize, y: u8) -> Pixel[src]

Returns value of pixel at given co-ordinates. Returns true for white, false for black.

Panics

Panics if (x, y) is out of the bounds (width, height).

Trait Implementations

impl AsRef<[u8]> for MemoryDisplayBuffer[src]

impl Clone for MemoryDisplayBuffer[src]

impl Debug for MemoryDisplayBuffer[src]

impl PartialEq<MemoryDisplayBuffer> for MemoryDisplayBuffer[src]

impl StructuralPartialEq for MemoryDisplayBuffer[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.