[−][src]Struct rpi_memory_display::MemoryDisplayBuffer
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]
fn clone(&self) -> MemoryDisplayBuffer
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MemoryDisplayBuffer
[src]
impl PartialEq<MemoryDisplayBuffer> for MemoryDisplayBuffer
[src]
fn eq(&self, other: &MemoryDisplayBuffer) -> bool
[src]
fn ne(&self, other: &MemoryDisplayBuffer) -> bool
[src]
impl StructuralPartialEq for MemoryDisplayBuffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for MemoryDisplayBuffer
impl Send for MemoryDisplayBuffer
impl Sync for MemoryDisplayBuffer
impl Unpin for MemoryDisplayBuffer
impl UnwindSafe for MemoryDisplayBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,