[][src]Struct embedded_graphics::pixelcolor::Gray2

pub struct Gray2(_);

2 bit grayscale color.

Methods

impl Gray2[src]

pub const fn new(luma: u8) -> Self[src]

Creates a new grayscale color.

Too large luma values are masked to the valid range by setting the upper bits to 0.

Trait Implementations

impl GrayColor for Gray2[src]

const BLACK: Self[src]

Black color (0% luma)

const WHITE: Self[src]

White color (100% luma)

impl PixelColor for Gray2[src]

type Raw = RawU2

Raw data type. Read more

impl PartialEq<Gray2> for Gray2[src]

impl Eq for Gray2[src]

impl Ord for Gray2[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<Gray2> for Gray2[src]

impl Debug for Gray2[src]

impl From<Gray2> for Rgb555[src]

impl From<Gray2> for Bgr555[src]

impl From<Gray2> for Rgb565[src]

impl From<Gray2> for Bgr565[src]

impl From<Gray2> for Rgb888[src]

impl From<Gray2> for Bgr888[src]

impl From<BinaryColor> for Gray2[src]

impl From<RawU2> for Gray2[src]

impl From<Gray2> for RawU2[src]

impl Copy for Gray2[src]

impl Clone for Gray2[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 Gray2

impl Send for Gray2

impl Sync for Gray2

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]

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

fn is<T>() -> bool where
    T: Scalar
[src]

Tests if Self the same as the type T Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,