pub struct XRGBColour(pub u32);
Expand description
Represents 8 pixels, each of which can be any 3-bit RGB colour
Tuple Fields§
§0: u32
Implementations§
Source§impl XRGBColour
impl XRGBColour
Sourcepub const fn new(red: u8, green: u8, blue: u8) -> XRGBColour
pub const fn new(red: u8, green: u8, blue: u8) -> XRGBColour
Create a new block of 8 coloured pixels by mixing 8 red/black pixels, 8 green/black pixels and 8 blue/black pixels.
Sourcepub const fn pixel_has_red(self, pixel: u8) -> bool
pub const fn pixel_has_red(self, pixel: u8) -> bool
Pixel must be in the range 0..7, where 0 is the rightmost pixel
Sourcepub const fn pixel_has_green(self, pixel: u8) -> bool
pub const fn pixel_has_green(self, pixel: u8) -> bool
Pixel must be in the range 0..7, where 0 is the rightmost pixel
Sourcepub const fn pixel_has_blue(self, pixel: u8) -> bool
pub const fn pixel_has_blue(self, pixel: u8) -> bool
Pixel must be in the range 0..7, where 0 is the rightmost pixel
Trait Implementations§
Source§impl Clone for XRGBColour
impl Clone for XRGBColour
Source§fn clone(&self) -> XRGBColour
fn clone(&self) -> XRGBColour
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for XRGBColour
impl Debug for XRGBColour
impl Copy for XRGBColour
Auto Trait Implementations§
impl Freeze for XRGBColour
impl RefUnwindSafe for XRGBColour
impl Send for XRGBColour
impl Sync for XRGBColour
impl Unpin for XRGBColour
impl UnwindSafe for XRGBColour
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more