pub enum OctColor {
Black = 0,
White = 1,
Green = 2,
Blue = 3,
Red = 4,
Yellow = 5,
Orange = 6,
HiZ = 7,
}Expand description
For the 7 Color Displays
Variants§
Black = 0
Black Color
White = 1
White Color
Green = 2
Green Color
Blue = 3
Blue Color
Red = 4
Red Color
Yellow = 5
Yellow Color
Orange = 6
Orange Color
HiZ = 7
HiZ / Clean Color
Implementations§
Source§impl OctColor
impl OctColor
Sourcepub fn get_nibble(self) -> u8
pub fn get_nibble(self) -> u8
Gets the Nibble representation of the Color as needed by the display
Sourcepub fn colors_byte(a: OctColor, b: OctColor) -> u8
pub fn colors_byte(a: OctColor, b: OctColor) -> u8
Converts two colors into a single byte for the Display
Sourcepub fn from_nibble(nibble: u8) -> Result<OctColor, OutOfColorRangeParseError>
pub fn from_nibble(nibble: u8) -> Result<OctColor, OutOfColorRangeParseError>
Take the nibble (lower 4 bits) and convert to an OctColor if possible
Sourcepub fn split_byte(
byte: u8,
) -> Result<(OctColor, OctColor), OutOfColorRangeParseError>
pub fn split_byte( byte: u8, ) -> Result<(OctColor, OctColor), OutOfColorRangeParseError>
Split the nibbles of a single byte and convert both to an OctColor if possible
Trait Implementations§
Source§impl ColorType for OctColor
impl ColorType for OctColor
Source§const BITS_PER_PIXEL_PER_BUFFER: usize = 4usize
const BITS_PER_PIXEL_PER_BUFFER: usize = 4usize
Number of bit used to represent this color type in a single buffer.
To get the real number of bits per pixel you should multiply this by
BUFFER_COUNTSource§const BUFFER_COUNT: usize = 1usize
const BUFFER_COUNT: usize = 1usize
Number of buffer used to represent this color type
splitted buffer like tricolo is 2, otherwise this should be 1.
Source§impl From<BinaryColor> for OctColor
Available on crate feature graphics only.
impl From<BinaryColor> for OctColor
Available on crate feature
graphics only.Source§fn from(b: BinaryColor) -> OctColor
fn from(b: BinaryColor) -> OctColor
Converts to this type from the input type.
Source§impl PixelColor for OctColor
Available on crate feature graphics only.
impl PixelColor for OctColor
Available on crate feature
graphics only.impl Copy for OctColor
impl Eq for OctColor
impl StructuralPartialEq for OctColor
Auto Trait Implementations§
impl Freeze for OctColor
impl RefUnwindSafe for OctColor
impl Send for OctColor
impl Sync for OctColor
impl Unpin for OctColor
impl UnwindSafe for OctColor
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
OverflowingCasts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
UnwrappedCasts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
WrappingCasts the value.