[][src]Struct vga_framebuffer::XRGBColour

pub struct XRGBColour(pub u32);

Represents 8 pixels, each of which can be any 3-bit RGB colour

Methods

impl XRGBColour[src]

pub const fn new(red: u8, green: u8, blue: u8) -> XRGBColour[src]

Create a new block of 8 coloured pixels by mixing 8 red/black pixels, 8 green/black pixels and 8 blue/black pixels.

pub const fn red(self) -> u32[src]

Get the 8 red/black pixels in the bottom 8 bits

pub const fn green(self) -> u32[src]

Get the 8 green/black pixels in the bottom 8 bits

pub const fn blue(self) -> u32[src]

Get the 8 blue/black pixels in the bottom 8 bits

pub const fn pixel_has_red(self, pixel: u8) -> bool[src]

Pixel must be in the range 0..7, where 0 is the rightmost pixel

pub const fn pixel_has_green(self, pixel: u8) -> bool[src]

Pixel must be in the range 0..7, where 0 is the rightmost pixel

pub const fn pixel_has_blue(self, pixel: u8) -> bool[src]

Pixel must be in the range 0..7, where 0 is the rightmost pixel

Trait Implementations

impl Debug for XRGBColour[src]

impl Copy for XRGBColour[src]

impl Clone for XRGBColour[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Unpin for XRGBColour

impl Send for XRGBColour

impl Sync for XRGBColour

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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