Struct embedded_graphics::pixelcolor::Bgr565[][src]

pub struct Bgr565(_);
Expand description

Bgr565 color.

Use the methods provided by the RgbColor trait to access individual color channels and predefined color constants.

See the module-level documentation for more information about conversion between this type and raw data.

Implementations

impl Bgr565 where
    Bgr565: RgbColor
[src]

pub const fn new(r: u8, g: u8, b: u8) -> Bgr565[src]

Creates a new Bgr565 color. Too large channel values will be limited by setting the unused most significant bits to zero.

Trait Implementations

impl Clone for Bgr565[src]

pub fn clone(&self) -> Bgr565[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl ColorMapping for Bgr565[src]

fn char_to_color(c: char) -> Self[src]

Converts a char into a color of type C.

fn color_to_char(color: Self) -> char[src]

Converts a color of type C into a char.

const NONE_COLOR: Rgb888[src]

Color used to display None values when EG_FANCY_PANIC is enabled. Read more

impl Debug for Bgr565[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Default for Bgr565[src]

pub fn default() -> Bgr565[src]

Returns the “default value” for a type. Read more

impl From<Bgr555> for Bgr565[src]

pub fn from(other: Bgr555) -> Bgr565[src]

Performs the conversion.

impl From<Bgr565> for Rgb565[src]

pub fn from(other: Bgr565) -> Rgb565[src]

Performs the conversion.

impl From<Bgr565> for BinaryColor[src]

pub fn from(color: Bgr565) -> BinaryColor[src]

Performs the conversion.

impl From<Bgr565> for Bgr555[src]

pub fn from(other: Bgr565) -> Bgr555[src]

Performs the conversion.

impl From<Bgr565> for Bgr888[src]

pub fn from(other: Bgr565) -> Bgr888[src]

Performs the conversion.

impl From<Bgr565> for Rgb888[src]

pub fn from(other: Bgr565) -> Rgb888[src]

Performs the conversion.

impl From<Bgr565> for Gray4[src]

pub fn from(other: Bgr565) -> Gray4[src]

Performs the conversion.

impl From<Bgr565> for Gray2[src]

pub fn from(other: Bgr565) -> Gray2[src]

Performs the conversion.

impl From<Bgr565> for Rgb555[src]

pub fn from(other: Bgr565) -> Rgb555[src]

Performs the conversion.

impl From<Bgr565> for Gray8[src]

pub fn from(other: Bgr565) -> Gray8[src]

Performs the conversion.

impl From<Bgr565> for RawU16[src]

pub fn from(color: Bgr565) -> RawU16[src]

Performs the conversion.

impl From<Bgr888> for Bgr565[src]

pub fn from(other: Bgr888) -> Bgr565[src]

Performs the conversion.

impl From<BinaryColor> for Bgr565[src]

pub fn from(color: BinaryColor) -> Bgr565[src]

Performs the conversion.

impl From<Gray2> for Bgr565[src]

pub fn from(other: Gray2) -> Bgr565[src]

Performs the conversion.

impl From<Gray4> for Bgr565[src]

pub fn from(other: Gray4) -> Bgr565[src]

Performs the conversion.

impl From<Gray8> for Bgr565[src]

pub fn from(other: Gray8) -> Bgr565[src]

Performs the conversion.

impl From<RawU16> for Bgr565[src]

pub fn from(data: RawU16) -> Bgr565[src]

Performs the conversion.

impl From<Rgb555> for Bgr565[src]

pub fn from(other: Rgb555) -> Bgr565[src]

Performs the conversion.

impl From<Rgb565> for Bgr565[src]

pub fn from(other: Rgb565) -> Bgr565[src]

Performs the conversion.

impl From<Rgb888> for Bgr565[src]

pub fn from(other: Rgb888) -> Bgr565[src]

Performs the conversion.

impl Hash for Bgr565[src]

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher
[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Ord for Bgr565[src]

pub fn cmp(&self, other: &Bgr565) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

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

Restrict a value to a certain interval. Read more

impl PartialEq<Bgr565> for Bgr565[src]

pub fn eq(&self, other: &Bgr565) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

pub fn ne(&self, other: &Bgr565) -> bool[src]

This method tests for !=.

impl PartialOrd<Bgr565> for Bgr565[src]

pub fn partial_cmp(&self, other: &Bgr565) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PixelColor for Bgr565[src]

type Raw = RawU16

Raw data type. Read more

impl RgbColor for Bgr565[src]

pub fn r(&self) -> u8[src]

Returns the red channel value.

pub fn g(&self) -> u8[src]

Returns the green channel value.

pub fn b(&self) -> u8[src]

Returns the blue channel value.

pub const MAX_R: u8[src]

The maximum value in the red channel.

pub const MAX_G: u8[src]

The maximum value in the green channel.

pub const MAX_B: u8[src]

The maximum value in the blue channel.

pub const BLACK: Bgr565[src]

Black color (R: 0%, G: 0%, B: 0%)

pub const RED: Bgr565[src]

Red color (R: 100%, G: 0%, B: 0%)

pub const GREEN: Bgr565[src]

Green color (R: 0%, G: 100%, B: 0%)

pub const BLUE: Bgr565[src]

Blue color (R: 0%, G: 0%, B: 100%)

pub const YELLOW: Bgr565[src]

Yellow color (R: 100%, G: 100%, B: 0%)

pub const MAGENTA: Bgr565[src]

Magenta color (R: 100%, G: 0%, B: 100%)

pub const CYAN: Bgr565[src]

Cyan color (R: 0%, G: 100%, B: 100%)

pub const WHITE: Bgr565[src]

White color (R: 100%, G: 100%, B: 100%)

impl WebColors for Bgr565[src]

Named web colors.

pub const CSS_ALICE_BLUE: Bgr565[src]

Alice Blue

pub const CSS_ANTIQUE_WHITE: Bgr565[src]

Antique White

pub const CSS_AQUA: Bgr565[src]

Aqua

pub const CSS_AQUAMARINE: Bgr565[src]

Aquamarine

pub const CSS_AZURE: Bgr565[src]

Azure

pub const CSS_BEIGE: Bgr565[src]

Beige

pub const CSS_BISQUE: Bgr565[src]

Bisque

pub const CSS_BLACK: Bgr565[src]

Black

pub const CSS_BLANCHED_ALMOND: Bgr565[src]

Blanched Almond

pub const CSS_BLUE: Bgr565[src]

Blue

pub const CSS_BLUE_VIOLET: Bgr565[src]

Blue Violet

pub const CSS_BROWN: Bgr565[src]

Brown

pub const CSS_BURLY_WOOD: Bgr565[src]

Burly Wood

pub const CSS_CADET_BLUE: Bgr565[src]

Cadet Blue

pub const CSS_CHARTREUSE: Bgr565[src]

Chartreuse

pub const CSS_CHOCOLATE: Bgr565[src]

Chocolate

pub const CSS_CORAL: Bgr565[src]

Coral

pub const CSS_CORNFLOWER_BLUE: Bgr565[src]

Cornflower Blue

pub const CSS_CORNSILK: Bgr565[src]

Cornsilk

pub const CSS_CRIMSON: Bgr565[src]

Crimson

pub const CSS_CYAN: Bgr565[src]

Cyan

pub const CSS_DARK_BLUE: Bgr565[src]

Dark Blue

pub const CSS_DARK_CYAN: Bgr565[src]

Dark Cyan

pub const CSS_DARK_GOLDENROD: Bgr565[src]

Dark Goldenrod

pub const CSS_DARK_GRAY: Bgr565[src]

Dark Gray

pub const CSS_DARK_GREEN: Bgr565[src]

Dark Green

pub const CSS_DARK_KHAKI: Bgr565[src]

Dark Khaki

pub const CSS_DARK_MAGENTA: Bgr565[src]

Dark Magenta

pub const CSS_DARK_OLIVE_GREEN: Bgr565[src]

Dark Olive Green

pub const CSS_DARK_ORANGE: Bgr565[src]

Dark Orange

pub const CSS_DARK_ORCHID: Bgr565[src]

Dark Orchid

pub const CSS_DARK_RED: Bgr565[src]

Dark Red

pub const CSS_DARK_SALMON: Bgr565[src]

Dark Salmon

pub const CSS_DARK_SEA_GREEN: Bgr565[src]

Dark Sea Green

pub const CSS_DARK_SLATE_BLUE: Bgr565[src]

Dark Slate Blue

pub const CSS_DARK_SLATE_GRAY: Bgr565[src]

Dark Slate Gray

pub const CSS_DARK_TURQUOISE: Bgr565[src]

Dark Turquoise

pub const CSS_DARK_VIOLET: Bgr565[src]

Dark Violet

pub const CSS_DEEP_PINK: Bgr565[src]

Deep Pink

pub const CSS_DEEP_SKY_BLUE: Bgr565[src]

Deep Sky Blue

pub const CSS_DIM_GRAY: Bgr565[src]

Dim Gray

pub const CSS_DODGER_BLUE: Bgr565[src]

Dodger Blue

pub const CSS_FIRE_BRICK: Bgr565[src]

Fire Brick

pub const CSS_FLORAL_WHITE: Bgr565[src]

Floral White

pub const CSS_FOREST_GREEN: Bgr565[src]

Forest Green

pub const CSS_FUCHSIA: Bgr565[src]

Fuchsia

pub const CSS_GAINSBORO: Bgr565[src]

Gainsboro

pub const CSS_GHOST_WHITE: Bgr565[src]

Ghost White

pub const CSS_GOLD: Bgr565[src]

Gold

pub const CSS_GOLDENROD: Bgr565[src]

Goldenrod

pub const CSS_GRAY: Bgr565[src]

Gray

pub const CSS_GREEN: Bgr565[src]

Green

pub const CSS_GREEN_YELLOW: Bgr565[src]

Green Yellow

pub const CSS_HONEYDEW: Bgr565[src]

Honeydew

pub const CSS_HOT_PINK: Bgr565[src]

Hot Pink

pub const CSS_INDIAN_RED: Bgr565[src]

Indian Red

pub const CSS_INDIGO: Bgr565[src]

Indigo

pub const CSS_IVORY: Bgr565[src]

Ivory

pub const CSS_KHAKI: Bgr565[src]

Khaki

pub const CSS_LAVENDER: Bgr565[src]

Lavender

pub const CSS_LAVENDER_BLUSH: Bgr565[src]

Lavender Blush

pub const CSS_LAWN_GREEN: Bgr565[src]

Lawn Green

pub const CSS_LEMON_CHIFFON: Bgr565[src]

Lemon Chiffon

pub const CSS_LIGHT_BLUE: Bgr565[src]

Light Blue

pub const CSS_LIGHT_CORAL: Bgr565[src]

Light Coral

pub const CSS_LIGHT_CYAN: Bgr565[src]

Light Cyan

pub const CSS_LIGHT_GOLDENROD_YELLOW: Bgr565[src]

Light Goldenrod Yellow

pub const CSS_LIGHT_GRAY: Bgr565[src]

Light Gray

pub const CSS_LIGHT_GREEN: Bgr565[src]

Light Green

pub const CSS_LIGHT_PINK: Bgr565[src]

Light Pink

pub const CSS_LIGHT_SALMON: Bgr565[src]

Light Salmon

pub const CSS_LIGHT_SEA_GREEN: Bgr565[src]

Light Sea Green

pub const CSS_LIGHT_SKY_BLUE: Bgr565[src]

Light Sky Blue

pub const CSS_LIGHT_SLATE_GRAY: Bgr565[src]

Light Slate Gray

pub const CSS_LIGHT_STEEL_BLUE: Bgr565[src]

Light Steel Blue

pub const CSS_LIGHT_YELLOW: Bgr565[src]

Light Yellow

pub const CSS_LIME: Bgr565[src]

Lime

pub const CSS_LIME_GREEN: Bgr565[src]

Lime Green

pub const CSS_LINEN: Bgr565[src]

Linen

pub const CSS_MAGENTA: Bgr565[src]

Magenta

pub const CSS_MAROON: Bgr565[src]

Maroon

pub const CSS_MEDIUM_AQUAMARINE: Bgr565[src]

Medium Aquamarine

pub const CSS_MEDIUM_BLUE: Bgr565[src]

Medium Blue

pub const CSS_MEDIUM_ORCHID: Bgr565[src]

Medium Orchid

pub const CSS_MEDIUM_PURPLE: Bgr565[src]

Medium Purple

pub const CSS_MEDIUM_SEA_GREEN: Bgr565[src]

Medium Sea Green

pub const CSS_MEDIUM_SLATE_BLUE: Bgr565[src]

Medium Slate Blue

pub const CSS_MEDIUM_SPRING_GREEN: Bgr565[src]

Medium Spring Green

pub const CSS_MEDIUM_TURQUOISE: Bgr565[src]

Medium Turquoise

pub const CSS_MEDIUM_VIOLET_RED: Bgr565[src]

Medium Violet Red

pub const CSS_MIDNIGHT_BLUE: Bgr565[src]

Midnight Blue

pub const CSS_MINT_CREAM: Bgr565[src]

Mint Cream

pub const CSS_MISTY_ROSE: Bgr565[src]

Misty Rose

pub const CSS_MOCCASIN: Bgr565[src]

Moccasin

pub const CSS_NAVAJO_WHITE: Bgr565[src]

Navajo White

pub const CSS_NAVY: Bgr565[src]

Navy

pub const CSS_OLD_LACE: Bgr565[src]

Old Lace

pub const CSS_OLIVE: Bgr565[src]

Olive

pub const CSS_OLIVE_DRAB: Bgr565[src]

Olive Drab

pub const CSS_ORANGE: Bgr565[src]

Orange

pub const CSS_ORANGE_RED: Bgr565[src]

Orange Red

pub const CSS_ORCHID: Bgr565[src]

Orchid

pub const CSS_PALE_GOLDENROD: Bgr565[src]

Pale Goldenrod

pub const CSS_PALE_GREEN: Bgr565[src]

Pale Green

pub const CSS_PALE_TURQUOISE: Bgr565[src]

Pale Turquoise

pub const CSS_PALE_VIOLET_RED: Bgr565[src]

Pale Violet Red

pub const CSS_PAPAYA_WHIP: Bgr565[src]

Papaya Whip

pub const CSS_PEACH_PUFF: Bgr565[src]

Peach Puff

pub const CSS_PERU: Bgr565[src]

Peru

pub const CSS_PINK: Bgr565[src]

Pink

pub const CSS_PLUM: Bgr565[src]

Plum

pub const CSS_POWDER_BLUE: Bgr565[src]

Powder Blue

pub const CSS_PURPLE: Bgr565[src]

Purple

pub const CSS_REBECCAPURPLE: Bgr565[src]

Rebeccapurple

pub const CSS_RED: Bgr565[src]

Red

pub const CSS_ROSY_BROWN: Bgr565[src]

Rosy Brown

pub const CSS_ROYAL_BLUE: Bgr565[src]

Royal Blue

pub const CSS_SADDLE_BROWN: Bgr565[src]

Saddle Brown

pub const CSS_SALMON: Bgr565[src]

Salmon

pub const CSS_SANDY_BROWN: Bgr565[src]

Sandy Brown

pub const CSS_SEA_GREEN: Bgr565[src]

Sea Green

pub const CSS_SEASHELL: Bgr565[src]

Seashell

pub const CSS_SIENNA: Bgr565[src]

Sienna

pub const CSS_SILVER: Bgr565[src]

Silver

pub const CSS_SKY_BLUE: Bgr565[src]

Sky Blue

pub const CSS_SLATE_BLUE: Bgr565[src]

Slate Blue

pub const CSS_SLATE_GRAY: Bgr565[src]

Slate Gray

pub const CSS_SNOW: Bgr565[src]

Snow

pub const CSS_SPRING_GREEN: Bgr565[src]

Spring Green

pub const CSS_STEEL_BLUE: Bgr565[src]

Steel Blue

pub const CSS_TAN: Bgr565[src]

Tan

pub const CSS_TEAL: Bgr565[src]

Teal

pub const CSS_THISTLE: Bgr565[src]

Thistle

pub const CSS_TOMATO: Bgr565[src]

Tomato

pub const CSS_TURQUOISE: Bgr565[src]

Turquoise

pub const CSS_VIOLET: Bgr565[src]

Violet

pub const CSS_WHEAT: Bgr565[src]

Wheat

pub const CSS_WHITE: Bgr565[src]

White

pub const CSS_WHITE_SMOKE: Bgr565[src]

White Smoke

pub const CSS_YELLOW: Bgr565[src]

Yellow

pub const CSS_YELLOW_GREEN: Bgr565[src]

Yellow Green

impl Copy for Bgr565[src]

impl Eq for Bgr565[src]

impl StructuralEq for Bgr565[src]

impl StructuralPartialEq for Bgr565[src]

Auto Trait Implementations

impl RefUnwindSafe for Bgr565

impl Send for Bgr565

impl Sync for Bgr565

impl Unpin for Bgr565

impl UnwindSafe for Bgr565

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

pub fn lossless_try_into(self) -> Option<Dst>[src]

Performs the conversion.

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

pub fn lossy_into(self) -> Dst[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

pub fn inlined_clone(&self) -> T[src]

Performance hack: Clone doesn’t get inlined for Copy types in debug mode, so make it inline anyway.

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

Tests if Self the same as the type T Read more

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

pub fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

pub fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).

pub fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

pub fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.

impl<C> ToBytes for C where
    C: PixelColor + Into<<C as PixelColor>::Raw>, 
[src]

type Bytes = <<C as PixelColor>::Raw as ToBytes>::Bytes

Return type of methods in this trait.

pub fn to_le_bytes(self) -> <C as ToBytes>::Bytes[src]

Converts a color into a byte array with little endian byte order.

pub fn to_be_bytes(self) -> <C as ToBytes>::Bytes[src]

Converts a color into a byte array with big endian byte order.

pub fn to_ne_bytes(self) -> <C as ToBytes>::Bytes[src]

Converts a color into a byte array with native byte order.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V