#[repr(C)]pub struct Color(pub u32);
Expand description
A red, green, blue, and alpha color value stored in 32-bits.
Tuple Fields§
§0: u32
Implementations§
source§impl Color
impl Color
sourcepub const fn new(red: u8, green: u8, blue: u8, alpha: u8) -> Self
pub const fn new(red: u8, green: u8, blue: u8, alpha: u8) -> Self
Returns a new color with the provided components.
sourcepub fn new_f32(red: f32, green: f32, blue: f32, alpha: f32) -> Self
pub fn new_f32(red: f32, green: f32, blue: f32, alpha: f32) -> Self
Returns a new color by converting each component from its 0.0..=1.0
range into a 0..=255
range.
sourcepub const fn alpha(self) -> u8
pub const fn alpha(self) -> u8
Returns the alpha component of this color, range 0-255. A value of 255 is completely opaque.
sourcepub fn alpha_f32(self) -> f32
pub fn alpha_f32(self) -> f32
Returns the alpha component of this color, range 0.0-1.0. A value of 1.0 is completely opaque.
sourcepub const fn with_red(self, red: u8) -> Self
pub const fn with_red(self, red: u8) -> Self
Returns a new color replacing this colors red channel with red
.
sourcepub const fn with_green(self, red: u8) -> Self
pub const fn with_green(self, red: u8) -> Self
Returns a new color replacing this colors green channel with green
.
sourcepub const fn with_blue(self, blue: u8) -> Self
pub const fn with_blue(self, blue: u8) -> Self
Returns a new color replacing this colors blue channel with blue
.
sourcepub const fn with_alpha(self, alpha: u8) -> Self
pub const fn with_alpha(self, alpha: u8) -> Self
Returns a new color replacing this colors alpha channel with alpha
.
sourcepub fn with_red_f32(self, red: f32) -> Self
pub fn with_red_f32(self, red: f32) -> Self
Returns a new color replacing this colors red channel with red
.
sourcepub fn with_green_f32(self, green: f32) -> Self
pub fn with_green_f32(self, green: f32) -> Self
Returns a new color replacing this colors green channel with green
.
sourcepub fn with_blue_f32(self, blue: f32) -> Self
pub fn with_blue_f32(self, blue: f32) -> Self
Returns a new color replacing this colors blue channel with blue
.
sourcepub fn with_alpha_f32(self, alpha: f32) -> Self
pub fn with_alpha_f32(self, alpha: f32) -> Self
Returns a new color replacing this colors alpha channel with alpha
.
source§impl Color
impl Color
sourcepub const ALICEBLUE: Self = _
pub const ALICEBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const ANTIQUEWHITE: Self = _
pub const ANTIQUEWHITE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const AQUA: Self = _
pub const AQUA: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const AQUAMARINE: Self = _
pub const AQUAMARINE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const AZURE: Self = _
pub const AZURE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BEIGE: Self = _
pub const BEIGE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BISQUE: Self = _
pub const BISQUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BLACK: Self = _
pub const BLACK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BLANCHEDALMOND: Self = _
pub const BLANCHEDALMOND: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BLUE: Self = _
pub const BLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BLUEVIOLET: Self = _
pub const BLUEVIOLET: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BROWN: Self = _
pub const BROWN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const BURLYWOOD: Self = _
pub const BURLYWOOD: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CADETBLUE: Self = _
pub const CADETBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CHARTREUSE: Self = _
pub const CHARTREUSE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CHOCOLATE: Self = _
pub const CHOCOLATE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CLEAR_BLACK: Self = _
pub const CLEAR_BLACK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CLEAR_WHITE: Self = _
pub const CLEAR_WHITE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CORAL: Self = _
pub const CORAL: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CORNFLOWERBLUE: Self = _
pub const CORNFLOWERBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CORNSILK: Self = _
pub const CORNSILK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CRIMSON: Self = _
pub const CRIMSON: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const CYAN: Self = _
pub const CYAN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKBLUE: Self = _
pub const DARKBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKCYAN: Self = _
pub const DARKCYAN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKGOLDENROD: Self = _
pub const DARKGOLDENROD: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKGRAY: Self = _
pub const DARKGRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKGREEN: Self = _
pub const DARKGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKGREY: Self = _
pub const DARKGREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKKHAKI: Self = _
pub const DARKKHAKI: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKMAGENTA: Self = _
pub const DARKMAGENTA: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKOLIVEGREEN: Self = _
pub const DARKOLIVEGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKORANGE: Self = _
pub const DARKORANGE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKORCHID: Self = _
pub const DARKORCHID: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKRED: Self = _
pub const DARKRED: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKSALMON: Self = _
pub const DARKSALMON: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKSEAGREEN: Self = _
pub const DARKSEAGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKSLATEBLUE: Self = _
pub const DARKSLATEBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKSLATEGRAY: Self = _
pub const DARKSLATEGRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKSLATEGREY: Self = _
pub const DARKSLATEGREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKTURQUOISE: Self = _
pub const DARKTURQUOISE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DARKVIOLET: Self = _
pub const DARKVIOLET: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DEEPPINK: Self = _
pub const DEEPPINK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DEEPSKYBLUE: Self = _
pub const DEEPSKYBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DIMGRAY: Self = _
pub const DIMGRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DIMGREY: Self = _
pub const DIMGREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const DODGERBLUE: Self = _
pub const DODGERBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const FIREBRICK: Self = _
pub const FIREBRICK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const FLORALWHITE: Self = _
pub const FLORALWHITE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const FORESTGREEN: Self = _
pub const FORESTGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const FUCHSIA: Self = _
pub const FUCHSIA: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GAINSBORO: Self = _
pub const GAINSBORO: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GHOSTWHITE: Self = _
pub const GHOSTWHITE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GOLD: Self = _
pub const GOLD: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GOLDENROD: Self = _
pub const GOLDENROD: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GRAY: Self = _
pub const GRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GREEN: Self = _
pub const GREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GREENYELLOW: Self = _
pub const GREENYELLOW: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const GREY: Self = _
pub const GREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const HONEYDEW: Self = _
pub const HONEYDEW: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const HOTPINK: Self = _
pub const HOTPINK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const INDIANRED: Self = _
pub const INDIANRED: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const INDIGO: Self = _
pub const INDIGO: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const IVORY: Self = _
pub const IVORY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const KHAKI: Self = _
pub const KHAKI: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LAVENDER: Self = _
pub const LAVENDER: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LAVENDERBLUSH: Self = _
pub const LAVENDERBLUSH: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LAWNGREEN: Self = _
pub const LAWNGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LEMONCHIFFON: Self = _
pub const LEMONCHIFFON: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTBLUE: Self = _
pub const LIGHTBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTCORAL: Self = _
pub const LIGHTCORAL: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTCYAN: Self = _
pub const LIGHTCYAN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTGOLDENRODYELLOW: Self = _
pub const LIGHTGOLDENRODYELLOW: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTGRAY: Self = _
pub const LIGHTGRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTGREEN: Self = _
pub const LIGHTGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTGREY: Self = _
pub const LIGHTGREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTPINK: Self = _
pub const LIGHTPINK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTSALMON: Self = _
pub const LIGHTSALMON: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTSEAGREEN: Self = _
pub const LIGHTSEAGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTSKYBLUE: Self = _
pub const LIGHTSKYBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTSLATEGRAY: Self = _
pub const LIGHTSLATEGRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTSLATEGREY: Self = _
pub const LIGHTSLATEGREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTSTEELBLUE: Self = _
pub const LIGHTSTEELBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIGHTYELLOW: Self = _
pub const LIGHTYELLOW: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIME: Self = _
pub const LIME: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LIMEGREEN: Self = _
pub const LIMEGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const LINEN: Self = _
pub const LINEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MAGENTA: Self = _
pub const MAGENTA: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MAROON: Self = _
pub const MAROON: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMAQUAMARINE: Self = _
pub const MEDIUMAQUAMARINE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMBLUE: Self = _
pub const MEDIUMBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMORCHID: Self = _
pub const MEDIUMORCHID: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMPURPLE: Self = _
pub const MEDIUMPURPLE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMSEAGREEN: Self = _
pub const MEDIUMSEAGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMSLATEBLUE: Self = _
pub const MEDIUMSLATEBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMSPRINGGREEN: Self = _
pub const MEDIUMSPRINGGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMTURQUOISE: Self = _
pub const MEDIUMTURQUOISE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MEDIUMVIOLETRED: Self = _
pub const MEDIUMVIOLETRED: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MIDNIGHTBLUE: Self = _
pub const MIDNIGHTBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MINTCREAM: Self = _
pub const MINTCREAM: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MISTYROSE: Self = _
pub const MISTYROSE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const MOCCASIN: Self = _
pub const MOCCASIN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const NAVAJOWHITE: Self = _
pub const NAVAJOWHITE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const NAVY: Self = _
pub const NAVY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const OLDLACE: Self = _
pub const OLDLACE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const OLIVE: Self = _
pub const OLIVE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const OLIVEDRAB: Self = _
pub const OLIVEDRAB: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const ORANGE: Self = _
pub const ORANGE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const ORANGERED: Self = _
pub const ORANGERED: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const ORCHID: Self = _
pub const ORCHID: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PALEGOLDENROD: Self = _
pub const PALEGOLDENROD: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PALEGREEN: Self = _
pub const PALEGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PALETURQUOISE: Self = _
pub const PALETURQUOISE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PALEVIOLETRED: Self = _
pub const PALEVIOLETRED: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PAPAYAWHIP: Self = _
pub const PAPAYAWHIP: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PEACHPUFF: Self = _
pub const PEACHPUFF: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PERU: Self = _
pub const PERU: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PINK: Self = _
pub const PINK: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PLUM: Self = _
pub const PLUM: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const POWDERBLUE: Self = _
pub const POWDERBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const PURPLE: Self = _
pub const PURPLE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const REBECCAPURPLE: Self = _
pub const REBECCAPURPLE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const RED: Self = _
pub const RED: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const ROSYBROWN: Self = _
pub const ROSYBROWN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const ROYALBLUE: Self = _
pub const ROYALBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SADDLEBROWN: Self = _
pub const SADDLEBROWN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SALMON: Self = _
pub const SALMON: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SANDYBROWN: Self = _
pub const SANDYBROWN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SEAGREEN: Self = _
pub const SEAGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SEASHELL: Self = _
pub const SEASHELL: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SIENNA: Self = _
pub const SIENNA: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SILVER: Self = _
pub const SILVER: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SKYBLUE: Self = _
pub const SKYBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SLATEBLUE: Self = _
pub const SLATEBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SLATEGRAY: Self = _
pub const SLATEGRAY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SLATEGREY: Self = _
pub const SLATEGREY: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SNOW: Self = _
pub const SNOW: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const SPRINGGREEN: Self = _
pub const SPRINGGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const STEELBLUE: Self = _
pub const STEELBLUE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const TAN: Self = _
pub const TAN: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const TEAL: Self = _
pub const TEAL: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const THISTLE: Self = _
pub const THISTLE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const TOMATO: Self = _
pub const TOMATO: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const TURQUOISE: Self = _
pub const TURQUOISE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const VIOLET: Self = _
pub const VIOLET: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const WHEAT: Self = _
pub const WHEAT: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const WHITE: Self = _
pub const WHITE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const WHITESMOKE: Self = _
pub const WHITESMOKE: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const YELLOW: Self = _
pub const YELLOW: Self = _
Equivalent to the CSS color keywords of the same name.
sourcepub const YELLOWGREEN: Self = _
pub const YELLOWGREEN: Self = _
Equivalent to the CSS color keywords of the same name.
Trait Implementations§
source§impl<Unit> From<Color> for StrokeOptions<Unit>where
Unit: DefaultStrokeWidth,
impl<Unit> From<Color> for StrokeOptions<Unit>where
Unit: DefaultStrokeWidth,
source§impl PartialEq for Color
impl PartialEq for Color
impl Copy for Color
impl Eq for Color
impl Pod for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters
when converting.source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar> ) -> T
self
into C
, using the provided parameters.§impl<A> Cast for A
impl<A> Cast for A
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle
.source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other
into Self
, while performing the appropriate scaling,
rounding and clamping.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
source§fn into_angle(self) -> U
fn into_angle(self) -> U
T
.source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters
when converting.source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar> ) -> T
self
into C
, using the provided parameters.source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
source§fn into_color(self) -> U
fn into_color(self) -> U
source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
§impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
§fn into_components(self) -> (Unit, Unit)
fn into_components(self) -> (Unit, Unit)
source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self
into T
, while performing the appropriate scaling,
rounding and clamping.source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors
fails to cast.source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains
the unclamped color. Read more