Struct embedded_graphics::pixelcolor::Gray2
source · pub struct Gray2(/* private fields */);
Expand description
2 bit grayscale color.
Implementations§
Trait Implementations§
source§impl ColorMapping for Gray2
impl ColorMapping for Gray2
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 Gray2
impl From<BinaryColor> for Gray2
source§fn from(color: BinaryColor) -> Gray2
fn from(color: BinaryColor) -> Gray2
Converts to this type from the input type.
source§impl From<Gray2> for BinaryColor
impl From<Gray2> for BinaryColor
source§fn from(color: Gray2) -> BinaryColor
fn from(color: Gray2) -> BinaryColor
Converts to this type from the input type.
source§impl Ord for Gray2
impl Ord for Gray2
source§impl PartialOrd for Gray2
impl PartialOrd for Gray2
impl Copy for Gray2
impl Eq for Gray2
impl StructuralPartialEq for Gray2
Auto Trait Implementations§
impl Freeze for Gray2
impl RefUnwindSafe for Gray2
impl Send for Gray2
impl Sync for Gray2
impl Unpin for Gray2
impl UnwindSafe for Gray2
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<C> IntoStorage for C
impl<C> IntoStorage for 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 C
impl<C> ToBytes for C
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.