Struct sensehat_screen::PixelColor
[−]
[src]
pub struct PixelColor { /* fields omitted */ }
A single LED pixel color, with RGB565 rendering.
Methods
impl PixelColor
[src]
pub fn new(red: u8, green: u8, blue: u8) -> Self
[src]
Create a new LED pixel color.
pub fn from_rgb565(color: [u8; 2]) -> Self
[src]
Create a new LED pixel color from a pair of RGB565-encoded bytes.
pub fn rgb565(&self) -> [u8; 2]
[src]
Encodes the current LED pixel color into a pair of RGB565-encoded bytes.
Trait Implementations
impl Debug for PixelColor
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for PixelColor
[src]
fn default() -> PixelColor
[src]
Returns the "default value" for a type. Read more
impl PartialEq for PixelColor
[src]
fn eq(&self, __arg_0: &PixelColor) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PixelColor) -> bool
[src]
This method tests for !=
.