#[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,
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>,
Source§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>,
Source§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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.§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§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