#[repr(C)]pub struct Color<T> {
pub r: T,
pub g: T,
pub b: T,
pub a: T,
}
Fields§
§r: T
§g: T
§b: T
§a: T
Implementations§
Source§impl<T> Color<T>where
T: ColorComponent,
impl<T> Color<T>where
T: ColorComponent,
pub const WHITE: Color<T>
pub const BLACK: Color<T>
pub const GRAY: Color<T>
pub const TRANSPARENT_WHITE: Color<T>
pub const TRANSPARENT_BLACK: Color<T>
pub const RED: Color<T>
pub const GREEN: Color<T>
pub const BLUE: Color<T>
pub const CYAN: Color<T>
pub const MAGENTA: Color<T>
pub const YELLOW: Color<T>
Trait Implementations§
Source§impl<T> Deref for Color<T>where
T: ColorComponent,
impl<T> Deref for Color<T>where
T: ColorComponent,
Source§impl<T> DerefMut for Color<T>where
T: ColorComponent,
impl<T> DerefMut for Color<T>where
T: ColorComponent,
Source§impl<'de, T> Deserialize<'de> for Color<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Color<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Color<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Color<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Display for Color<T>where
T: ColorComponent,
impl<T> Display for Color<T>where
T: ColorComponent,
Source§impl<T> Schematic for Color<T>where
T: Schematic + 'static,
impl<T> Schematic for Color<T>where
T: Schematic + 'static,
fn create_schema() -> Schema
Source§impl<T> Serialize for Color<T>where
T: Serialize,
impl<T> Serialize for Color<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TexturePixel for Color<f32>
impl TexturePixel for Color<f32>
Source§impl VertexAttribute for Color<f32>
impl VertexAttribute for Color<f32>
impl<T> Copy for Color<T>where
T: Copy,
impl<T> Eq for Color<T>where
T: ColorComponent + Eq,
Auto Trait Implementations§
impl<T> Freeze for Color<T>where
T: Freeze,
impl<T> RefUnwindSafe for Color<T>where
T: RefUnwindSafe,
impl<T> Send for Color<T>where
T: Send,
impl<T> Sync for Color<T>where
T: Sync,
impl<T> Unpin for Color<T>where
T: Unpin,
impl<T> UnwindSafe for Color<T>where
T: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more