[−][src]Struct embedded_graphics::pixelcolor::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 Clone for Gray2
[src]
fn clone(&self) -> Gray2
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Gray2
[src]
impl Debug for Gray2
[src]
impl Eq for Gray2
[src]
impl From<BinaryColor> for Gray2
[src]
fn from(color: BinaryColor) -> Self
[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<Gray2> for RawU2
[src]
impl From<RawU2> for Gray2
[src]
impl GrayColor for Gray2
[src]
fn luma(&self) -> u8
[src]
const BLACK: Self
[src]
Black color (0% luma)
const WHITE: Self
[src]
White color (100% luma)
impl Ord for Gray2
[src]
fn cmp(&self, other: &Gray2) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Gray2> for Gray2
[src]
impl PartialOrd<Gray2> for Gray2
[src]
fn partial_cmp(&self, other: &Gray2) -> Option<Ordering>
[src]
fn lt(&self, other: &Gray2) -> bool
[src]
fn le(&self, other: &Gray2) -> bool
[src]
fn gt(&self, other: &Gray2) -> bool
[src]
fn ge(&self, other: &Gray2) -> bool
[src]
impl PixelColor for Gray2
[src]
impl StructuralEq for Gray2
[src]
impl StructuralPartialEq for Gray2
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
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> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,