Struct embedded_graphics::pixelcolor::Gray4
source · pub struct Gray4(_);
Expand description
4 bit grayscale color.
Implementations§
Trait Implementations§
source§impl ColorMapping for Gray4
impl ColorMapping for Gray4
source§const NONE_COLOR: Rgb888 = Rgb888::CSS_STEEL_BLUE
const NONE_COLOR: Rgb888 = Rgb888::CSS_STEEL_BLUE
source§fn char_to_color(c: char) -> Self
fn char_to_color(c: char) -> Self
Converts a char into a color of type
C
.source§fn color_to_char(color: Self) -> char
fn color_to_char(color: Self) -> char
Converts a color of type
C
into a char.source§impl From<BinaryColor> for Gray4
impl From<BinaryColor> for Gray4
source§fn from(color: BinaryColor) -> Gray4
fn from(color: BinaryColor) -> Gray4
Converts to this type from the input type.
source§impl From<Gray4> for BinaryColor
impl From<Gray4> for BinaryColor
source§fn from(color: Gray4) -> BinaryColor
fn from(color: Gray4) -> BinaryColor
Converts to this type from the input type.
source§impl Ord for Gray4
impl Ord for Gray4
source§impl PartialEq<Gray4> for Gray4
impl PartialEq<Gray4> for Gray4
source§impl PartialOrd<Gray4> for Gray4
impl PartialOrd<Gray4> for Gray4
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Gray4
impl Eq for Gray4
impl StructuralEq for Gray4
impl StructuralPartialEq for Gray4
Auto Trait Implementations§
impl RefUnwindSafe for Gray4
impl Send for Gray4
impl Sync for Gray4
impl Unpin for Gray4
impl UnwindSafe for Gray4
Blanket Implementations§
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<C> IntoStorage for Cwhere
C: PixelColor,
<C as PixelColor>::Raw: From<C>,
impl<C> IntoStorage for Cwhere C: PixelColor, <C as PixelColor>::Raw: From<C>,
§type Storage = <<C as PixelColor>::Raw as RawData>::Storage
type Storage = <<C as PixelColor>::Raw as RawData>::Storage
The underlying storage type for the pixel color
source§fn into_storage(self) -> <C as IntoStorage>::Storage
fn into_storage(self) -> <C as IntoStorage>::Storage
Convert the
PixelColor
into its raw storage formsource§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)
Casts 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<C> ToBytes for Cwhere
C: PixelColor + Into<<C as PixelColor>::Raw>,
impl<C> ToBytes for Cwhere C: PixelColor + Into<<C as PixelColor>::Raw>,
source§fn to_le_bytes(self) -> <C as ToBytes>::Bytes
fn to_le_bytes(self) -> <C as ToBytes>::Bytes
Converts a color into a byte array with little endian byte order.
source§fn to_be_bytes(self) -> <C as ToBytes>::Bytes
fn to_be_bytes(self) -> <C as ToBytes>::Bytes
Converts a color into a byte array with big endian byte order.
source§fn to_ne_bytes(self) -> <C as ToBytes>::Bytes
fn to_ne_bytes(self) -> <C as ToBytes>::Bytes
Converts a color into a byte array with native byte order.
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
Casts 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
Casts the value.