RGBColor

Struct RGBColor 

Source
#[repr(C)]
pub struct RGBColor<T, A = T> { pub r: T, pub g: T, pub b: T, pub a: A, }
Expand description

A color in the RGB Color Space.

Fields§

§r: T

The red channel of a rgb space color

§g: T

The green channel of a rgb space color

§b: T

The blue channel of a rgb space color

§a: A

The alpha channel of a rgb space color

Implementations§

Source§

impl RGBColor<u8, ()>

Source

pub const ALICEBLUE: RGBColor<u8, ()>

aliceblue: #F0F8FF

Source

pub const ANTIQUEWHITE: RGBColor<u8, ()>

antiquewhite: #FAEBD7

Source

pub const AQUA: RGBColor<u8, ()>

aqua: #00FFFF

Source

pub const AQUAMARINE: RGBColor<u8, ()>

aquamarine: #7FFFD4

Source

pub const AZURE: RGBColor<u8, ()>

azure: #F0FFFF

Source

pub const BEIGE: RGBColor<u8, ()>

beige: #F5F5DC

Source

pub const BISQUE: RGBColor<u8, ()>

bisque: #FFE4C4

Source

pub const BLACK: RGBColor<u8, ()>

black: #000000

Source

pub const BLANCHEDALMOND: RGBColor<u8, ()>

blanchedalmond: #FFEBCD

Source

pub const BLUE: RGBColor<u8, ()>

blue: #0000FF

Source

pub const BLUEVIOLET: RGBColor<u8, ()>

blueviolet: #8A2BE2

Source

pub const BROWN: RGBColor<u8, ()>

brown: #A52A2A

Source

pub const BURLYWOOD: RGBColor<u8, ()>

burlywood: #DEB887

Source

pub const CADETBLUE: RGBColor<u8, ()>

cadetblue: #5F9EA0

Source

pub const CHARTREUSE: RGBColor<u8, ()>

chartreuse: #7FFF00

Source

pub const CHOCOLATE: RGBColor<u8, ()>

chocolate: #D2691E

Source

pub const CORAL: RGBColor<u8, ()>

coral: #FF7F50

Source

pub const CORNFLOWERBLUE: RGBColor<u8, ()>

cornflowerblue: #6495ED

Source

pub const CORNSILK: RGBColor<u8, ()>

cornsilk: #FFF8DC

Source

pub const CRIMSON: RGBColor<u8, ()>

crimson: #DC143C

Source

pub const CYAN: RGBColor<u8, ()>

cyan: #00FFFF

Source

pub const DARKBLUE: RGBColor<u8, ()>

darkblue: #00008B

Source

pub const DARKCYAN: RGBColor<u8, ()>

darkcyan: #008B8B

Source

pub const DARKGOLDENROD: RGBColor<u8, ()>

darkgoldenrod: #B8860B

Source

pub const DARKGRAY: RGBColor<u8, ()>

darkgray: #A9A9A9

Source

pub const DARKGREEN: RGBColor<u8, ()>

darkgreen: #006400

Source

pub const DARKGREY: RGBColor<u8, ()>

darkgrey: #A9A9A9

Source

pub const DARKKHAKI: RGBColor<u8, ()>

darkkhaki: #BDB76B

Source

pub const DARKMAGENTA: RGBColor<u8, ()>

darkmagenta: #8B008B

Source

pub const DARKOLIVEGREEN: RGBColor<u8, ()>

darkolivegreen: #556B2F

Source

pub const DARKORANGE: RGBColor<u8, ()>

darkorange: #FF8C00

Source

pub const DARKORCHID: RGBColor<u8, ()>

darkorchid: #9932CC

Source

pub const DARKRED: RGBColor<u8, ()>

darkred: #8B0000

Source

pub const DARKSALMON: RGBColor<u8, ()>

darksalmon: #E9967A

Source

pub const DARKSEAGREEN: RGBColor<u8, ()>

darkseagreen: #8FBC8F

Source

pub const DARKSLATEBLUE: RGBColor<u8, ()>

darkslateblue: #483D8B

Source

pub const DARKSLATEGRAY: RGBColor<u8, ()>

darkslategray: #2F4F4F

Source

pub const DARKSLATEGREY: RGBColor<u8, ()>

darkslategrey: #2F4F4F

Source

pub const DARKTURQUOISE: RGBColor<u8, ()>

darkturquoise: #00CED1

Source

pub const DARKVIOLET: RGBColor<u8, ()>

darkviolet: #9400D3

Source

pub const DEEPPINK: RGBColor<u8, ()>

deeppink: #FF1493

Source

pub const DEEPSKYBLUE: RGBColor<u8, ()>

deepskyblue: #00BFFF

Source

pub const DIMGRAY: RGBColor<u8, ()>

dimgray: #696969

Source

pub const DIMGREY: RGBColor<u8, ()>

dimgrey: #696969

Source

pub const DODGERBLUE: RGBColor<u8, ()>

dodgerblue: #1E90FF

Source

pub const FIREBRICK: RGBColor<u8, ()>

firebrick: #B22222

Source

pub const FLORALWHITE: RGBColor<u8, ()>

floralwhite: #FFFAF0

Source

pub const FORESTGREEN: RGBColor<u8, ()>

forestgreen: #228B22

Source

pub const FUCHSIA: RGBColor<u8, ()>

fuchsia: #FF00FF

Source

pub const GAINSBORO: RGBColor<u8, ()>

gainsboro: #DCDCDC

Source

pub const GHOSTWHITE: RGBColor<u8, ()>

ghostwhite: #F8F8FF

Source

pub const GOLDENROD: RGBColor<u8, ()>

goldenrod: #DAA520

Source

pub const GOLD: RGBColor<u8, ()>

gold: #FFD700

Source

pub const GRAY: RGBColor<u8, ()>

gray: #808080

Source

pub const GREEN: RGBColor<u8, ()>

green: #008000

Source

pub const GREENYELLOW: RGBColor<u8, ()>

greenyellow: #ADFF2F

Source

pub const GREY: RGBColor<u8, ()>

grey: #808080

Source

pub const HONEYDEW: RGBColor<u8, ()>

honeydew: #F0FFF0

Source

pub const HOTPINK: RGBColor<u8, ()>

hotpink: #FF69B4

Source

pub const INDIANRED: RGBColor<u8, ()>

indianred: #CD5C5C

Source

pub const INDIGO: RGBColor<u8, ()>

indigo: #4B0082

Source

pub const IVORY: RGBColor<u8, ()>

ivory: #FFFFF0

Source

pub const KHAKI: RGBColor<u8, ()>

khaki: #F0E68C

Source

pub const LAVENDERBLUSH: RGBColor<u8, ()>

lavenderblush: #FFF0F5

Source

pub const LAVENDER: RGBColor<u8, ()>

lavender: #E6E6FA

Source

pub const LAWNGREEN: RGBColor<u8, ()>

lawngreen: #7CFC00

Source

pub const LEMONCHIFFON: RGBColor<u8, ()>

lemonchiffon: #FFFACD

Source

pub const LIGHTBLUE: RGBColor<u8, ()>

lightblue: #ADD8E6

Source

pub const LIGHTCORAL: RGBColor<u8, ()>

lightcoral: #F08080

Source

pub const LIGHTCYAN: RGBColor<u8, ()>

lightcyan: #E0FFFF

Source

pub const LIGHTGOLDENRODYELLOW: RGBColor<u8, ()>

lightgoldenrodyellow: #FAFAD2

Source

pub const LIGHTGRAY: RGBColor<u8, ()>

lightgray: #D3D3D3

Source

pub const LIGHTGREEN: RGBColor<u8, ()>

lightgreen: #90EE90

Source

pub const LIGHTGREY: RGBColor<u8, ()>

lightgrey: #D3D3D3

Source

pub const LIGHTPINK: RGBColor<u8, ()>

lightpink: #FFB6C1

Source

pub const LIGHTSALMON: RGBColor<u8, ()>

lightsalmon: #FFA07A

Source

pub const LIGHTSEAGREEN: RGBColor<u8, ()>

lightseagreen: #20B2AA

Source

pub const LIGHTSKYBLUE: RGBColor<u8, ()>

lightskyblue: #87CEFA

Source

pub const LIGHTSLATEGRAY: RGBColor<u8, ()>

lightslategray: #778899

Source

pub const LIGHTSLATEGREY: RGBColor<u8, ()>

lightslategrey: #778899

Source

pub const LIGHTSTEELBLUE: RGBColor<u8, ()>

lightsteelblue: #B0C4DE

Source

pub const LIGHTYELLOW: RGBColor<u8, ()>

lightyellow: #FFFFE0

Source

pub const LIME: RGBColor<u8, ()>

lime: #00FF00

Source

pub const LIMEGREEN: RGBColor<u8, ()>

limegreen: #32CD32

Source

pub const LINEN: RGBColor<u8, ()>

linen: #FAF0E6

Source

pub const MAGENTA: RGBColor<u8, ()>

magenta: #FF00FF

Source

pub const MAROON: RGBColor<u8, ()>

maroon: #800000

Source

pub const MEDIUMAQUAMARINE: RGBColor<u8, ()>

mediumaquamarine: #66CDAA

Source

pub const MEDIUMBLUE: RGBColor<u8, ()>

mediumblue: #0000CD

Source

pub const MEDIUMORCHID: RGBColor<u8, ()>

mediumorchid: #BA55D3

Source

pub const MEDIUMPURPLE: RGBColor<u8, ()>

mediumpurple: #9370DB

Source

pub const MEDIUMSEAGREEN: RGBColor<u8, ()>

mediumseagreen: #3CB371

Source

pub const MEDIUMSLATEBLUE: RGBColor<u8, ()>

mediumslateblue: #7B68EE

Source

pub const MEDIUMSPRINGGREEN: RGBColor<u8, ()>

mediumspringgreen: #00FA9A

Source

pub const MEDIUMTURQUOISE: RGBColor<u8, ()>

mediumturquoise: #48D1CC

Source

pub const MEDIUMVIOLETRED: RGBColor<u8, ()>

mediumvioletred: #C71585

Source

pub const MIDNIGHTBLUE: RGBColor<u8, ()>

midnightblue: #191970

Source

pub const MINTCREAM: RGBColor<u8, ()>

mintcream: #F5FFFA

Source

pub const MISTYROSE: RGBColor<u8, ()>

mistyrose: #FFE4E1

Source

pub const MOCCASIN: RGBColor<u8, ()>

moccasin: #FFE4B5

Source

pub const NAVAJOWHITE: RGBColor<u8, ()>

navajowhite: #FFDEAD

Source

pub const NAVY: RGBColor<u8, ()>

navy: #000080

Source

pub const OLDLACE: RGBColor<u8, ()>

oldlace: #FDF5E6

Source

pub const OLIVE: RGBColor<u8, ()>

olive: #808000

Source

pub const OLIVEDRAB: RGBColor<u8, ()>

olivedrab: #6B8E23

Source

pub const ORANGE: RGBColor<u8, ()>

orange: #FFA500

Source

pub const ORANGERED: RGBColor<u8, ()>

orangered: #FF4500

Source

pub const ORCHID: RGBColor<u8, ()>

orchid: #DA70D6

Source

pub const PALEGOLDENROD: RGBColor<u8, ()>

palegoldenrod: #EEE8AA

Source

pub const PALEGREEN: RGBColor<u8, ()>

palegreen: #98FB98

Source

pub const PALETURQUOISE: RGBColor<u8, ()>

paleturquoise: #AFEEEE

Source

pub const PALEVIOLETRED: RGBColor<u8, ()>

palevioletred: #DB7093

Source

pub const PAPAYAWHIP: RGBColor<u8, ()>

papayawhip: #FFEFD5

Source

pub const PEACHPUFF: RGBColor<u8, ()>

peachpuff: #FFDAB9

Source

pub const PERU: RGBColor<u8, ()>

peru: #CD853F

Source

pub const PINK: RGBColor<u8, ()>

pink: #FFC0CB

Source

pub const PLUM: RGBColor<u8, ()>

plum: #DDA0DD

Source

pub const POWDERBLUE: RGBColor<u8, ()>

powderblue: #B0E0E6

Source

pub const PURPLE: RGBColor<u8, ()>

purple: #800080

Source

pub const REBECCAPURPLE: RGBColor<u8, ()>

rebeccapurple: #663399

Source

pub const RED: RGBColor<u8, ()>

red: #FF0000

Source

pub const ROSYBROWN: RGBColor<u8, ()>

rosybrown: #BC8F8F

Source

pub const ROYALBLUE: RGBColor<u8, ()>

royalblue: #4169E1

Source

pub const SADDLEBROWN: RGBColor<u8, ()>

saddlebrown: #8B4513

Source

pub const SALMON: RGBColor<u8, ()>

salmon: #FA8072

Source

pub const SANDYBROWN: RGBColor<u8, ()>

sandybrown: #F4A460

Source

pub const SEAGREEN: RGBColor<u8, ()>

seagreen: #2E8B57

Source

pub const SEASHELL: RGBColor<u8, ()>

seashell: #FFF5EE

Source

pub const SIENNA: RGBColor<u8, ()>

sienna: #A0522D

Source

pub const SILVER: RGBColor<u8, ()>

silver: #C0C0C0

Source

pub const SKYBLUE: RGBColor<u8, ()>

skyblue: #87CEEB

Source

pub const SLATEBLUE: RGBColor<u8, ()>

slateblue: #6A5ACD

Source

pub const SLATEGRAY: RGBColor<u8, ()>

slategray: #708090

Source

pub const SLATEGREY: RGBColor<u8, ()>

slategrey: #708090

Source

pub const SNOW: RGBColor<u8, ()>

snow: #FFFAFA

Source

pub const SPRINGGREEN: RGBColor<u8, ()>

springgreen: #00FF7F

Source

pub const STEELBLUE: RGBColor<u8, ()>

steelblue: #4682B4

Source

pub const TAN: RGBColor<u8, ()>

tan: #D2B48C

Source

pub const TEAL: RGBColor<u8, ()>

teal: #008080

Source

pub const THISTLE: RGBColor<u8, ()>

thistle: #D8BFD8

Source

pub const TOMATO: RGBColor<u8, ()>

tomato: #FF6347

Source

pub const TURQUOISE: RGBColor<u8, ()>

turquoise: #40E0D0

Source

pub const VIOLET: RGBColor<u8, ()>

violet: #EE82EE

Source

pub const WHEAT: RGBColor<u8, ()>

wheat: #F5DEB3

Source

pub const WHITE: RGBColor<u8, ()>

white: #FFFFFF

Source

pub const WHITESMOKE: RGBColor<u8, ()>

whitesmoke: #F5F5F5

Source

pub const YELLOW: RGBColor<u8, ()>

yellow: #FFFF00

Source

pub const YELLOWGREEN: RGBColor<u8, ()>

yellowgreen: #9ACD32

Source§

impl RGBColor<u8, ()>

Source

pub fn gray(value: u8) -> RGBColor<u8, ()>

Creates a new gray color from the given value.

Source

pub fn new(r: u8, g: u8, b: u8) -> RGBColor<u8, ()>

Creates a new rgb color from the given values.

Source§

impl RGBColor<u8>

Source

pub fn gray(value: u8) -> RGBColor<u8>

Create RGBA8 from (u8, u8, u8) tuple.

Source

pub fn new(r: u8, g: u8, b: u8, a: u8) -> RGBColor<u8>

Create RGBA8 from (u8, u8, u8, u8) tuple.

Source

pub fn map_all<F>(&self, f: F) -> RGBColor<u8>
where F: Fn(u8) -> u8,

Map operator to all channels.

Source§

impl RGBColor<f32>

Source

pub fn as_rgb(&self) -> RGBColor<u8, ()>

Create RGBA32 from (u8, u8, u8) tuple.

Source

pub fn as_rgba(&self) -> RGBColor<u8>

Create RGBA32 from (u8, u8, u8, u8) tuple.

Source§

impl RGBColor<f32>

Source

pub fn gray(value: f32) -> RGBColor<f32>

Create a new gray color in the RGB Color Space.

§Arguments

Input values are automatically normalized.

The normalized RGBA32 range is:

  • gray: [0, 1]
§Examples
let rgba32 = RGBA32::gray(0.5).with_alpha(0.5);
Source

pub fn new(r: f32, g: f32, b: f32, a: f32) -> RGBColor<f32>

Create a new color in the RGB Color Space.

§Arguments

Input values are automatically normalized.

The normalized RGBA32 range is:

  • r: [0, 1]
  • g: [0, 1]
  • b: [0, 1]
  • a: [0, 1]
§Examples
let rgba32 = RGBA32::new(1.0, 0.0, 0.0, 1.0);
Source§

impl RGBColor<f32>

Source

pub fn normalized(&self) -> RGBColor<f32>

Normalize RGBA32 color to range [0.0, 1.0].

The normalized RGBA32 range is:

  • r: [0, 1]
  • g: [0, 1]
  • b: [0, 1]
  • a: [0, 1]
Source

pub fn gamma_corrected(&self, gamma: f32) -> RGBColor<f32>

If γ >= 1 , it is a gamma expansion, and if γ < 1, it is a gamma compression.

Source

pub fn map_all<F>(&self, f: F) -> RGBColor<f32>
where F: Fn(f32) -> f32,

If γ >= 1 , it is a gamma expansion, and if γ < 1, it is a gamma compression.

Source§

impl<T, A> RGBColor<T, A>

Source

pub fn with_red(self, r: T) -> RGBColor<T, A>

Build a new color with the given red channel.

Source

pub fn with_green(self, g: T) -> RGBColor<T, A>

Build a new color with the given green channel.

Source

pub fn with_blue(self, b: T) -> RGBColor<T, A>

Build a new color with the given blue channel.

Source

pub fn with_alpha(self, a: A) -> RGBColor<T, A>

Build a new color with the given alpha channel.

Source

pub fn map<F, G>(&self, color: F, alpha: G) -> RGBColor<T, A>
where F: Fn(T) -> T, G: Fn(A) -> A, T: Clone, A: Clone,

Map operator to r, g, b channels, without alpha channel.

Source

pub fn map_color<F>(&self, f: F) -> RGBColor<T, A>
where F: Fn(T) -> T, T: Clone, A: Clone,

Map operator to r, g, b channels, without alpha channel.

Source

pub fn map_alpha<F>(&self, f: F) -> RGBColor<T, A>
where F: Fn(A) -> A, T: Clone, A: Clone,

Map operator to alpha channel only.

Trait Implementations§

Source§

impl<T, A> Clone for RGBColor<T, A>
where T: Clone, A: Clone,

Source§

fn clone(&self) -> RGBColor<T, A>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, A> Debug for RGBColor<T, A>
where T: Debug, A: Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for RGBColor<f32>

Source§

fn default() -> RGBColor<f32>

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

impl Default for RGBColor<u8>

Source§

fn default() -> RGBColor<u8>

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

impl Default for RGBColor<u8, ()>

Source§

fn default() -> RGBColor<u8, ()>

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

impl Display for RGBColor<f32>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for RGBColor<u8>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for RGBColor<u8, ()>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> From<&T> for RGBColor<f32>
where RGBColor<f32>: From<<T as ToOwned>::Owned>, T: ToOwned,

Source§

fn from(rgba: &T) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl<T> From<[T; 3]> for RGBColor<f32>
where T: Into<f32> + Copy,

Source§

fn from(rgba: [T; 3]) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl<T> From<[T; 3]> for RGBColor<u8>
where T: Into<u8> + Copy,

Source§

fn from(rgba: [T; 3]) -> RGBColor<u8>

Converts to this type from the input type.
Source§

impl<T> From<[T; 4]> for RGBColor<f32>
where T: Into<f32> + Copy,

Source§

fn from(rgba: [T; 4]) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl<T> From<[T; 4]> for RGBColor<u8>
where T: Into<u8> + Copy,

Source§

fn from(rgba: [T; 4]) -> RGBColor<u8>

Converts to this type from the input type.
Source§

impl<R, G, B> From<(R, G, B)> for RGBColor<f32>
where R: Into<f32>, G: Into<f32>, B: Into<f32>,

Source§

fn from(rgba: (R, G, B)) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl<R, G, B, A> From<(R, G, B, A)> for RGBColor<f32>
where R: Into<f32>, G: Into<f32>, B: Into<f32>, A: Into<f32>,

Source§

fn from(rgba: (R, G, B, A)) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl From<HSLColor<f32>> for RGBColor<f32>

Source§

impl From<HSVColor<f32>> for RGBColor<f32>

Source§

fn from(hsva: HSVColor<f32>) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl From<HSVColor<f32>> for RGBColor<u8>

Source§

fn from(hsva: HSVColor<f32>) -> RGBColor<u8>

Converts to this type from the input type.
Source§

impl From<RGBColor<f32>> for HSLColor<f32>

Source§

impl From<RGBColor<f32>> for HSVColor<f32>

Source§

fn from(rgba: RGBColor<f32>) -> HSVColor<f32>

Converts to this type from the input type.
Source§

impl From<RGBColor<f32>> for RGBColor<u8>

Source§

fn from(rgba: RGBColor<f32>) -> RGBColor<u8>

Converts to this type from the input type.
Source§

impl From<RGBColor<f32>> for RGBColor<u8, ()>

Source§

fn from(rgba: RGBColor<f32>) -> RGBColor<u8, ()>

Converts to this type from the input type.
Source§

impl From<RGBColor<u8>> for HSVColor<f32>

Source§

fn from(rgba: RGBColor<u8>) -> HSVColor<f32>

Converts to this type from the input type.
Source§

impl From<RGBColor<u8>> for RGBColor<f32>

Source§

fn from(rgba: RGBColor<u8>) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl From<RGBColor<u8, ()>> for HSVColor<f32>

Source§

fn from(rgba: RGBColor<u8, ()>) -> HSVColor<f32>

Converts to this type from the input type.
Source§

impl From<RGBColor<u8, ()>> for RGBColor<f32>

Source§

fn from(rgb: RGBColor<u8, ()>) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl From<u32> for RGBColor<f32>

Source§

fn from(rgba: u32) -> RGBColor<f32>

Converts to this type from the input type.
Source§

impl From<u32> for RGBColor<u8>

Source§

fn from(rgba: u32) -> RGBColor<u8>

Converts to this type from the input type.
Source§

impl Hash for RGBColor<f32>

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

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

impl LowerHex for RGBColor<f32>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl LowerHex for RGBColor<u8>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl LowerHex for RGBColor<u8, ()>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RGBColor<f32>

Source§

fn eq(&self, other: &RGBColor<f32>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for RGBColor<u8>

Source§

fn eq(&self, other: &RGBColor<u8>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl UpperHex for RGBColor<f32>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl UpperHex for RGBColor<u8>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl UpperHex for RGBColor<u8, ()>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T, A> Copy for RGBColor<T, A>
where T: Copy, A: Copy,

Source§

impl Eq for RGBColor<f32>

Source§

impl Eq for RGBColor<u8>

Auto Trait Implementations§

§

impl<T, A> Freeze for RGBColor<T, A>
where T: Freeze, A: Freeze,

§

impl<T, A> RefUnwindSafe for RGBColor<T, A>

§

impl<T, A> Send for RGBColor<T, A>
where T: Send, A: Send,

§

impl<T, A> Sync for RGBColor<T, A>
where T: Sync, A: Sync,

§

impl<T, A> Unpin for RGBColor<T, A>
where T: Unpin, A: Unpin,

§

impl<T, A> UnwindSafe for RGBColor<T, A>
where T: UnwindSafe, A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.