[−][src]Struct vga_framebuffer::XRGBColour
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(&self) -> XRGBColour
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
Blanket Implementations
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.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,