[][src]Struct batbox::Color

#[repr(C)]pub struct Color<T> {
    pub r: T,
    pub g: T,
    pub b: T,
    pub a: T,
}

Fields

r: Tg: Tb: Ta: T

Implementations

impl<T: ColorComponent> Color<T>[src]

pub const WHITE: Self[src]

pub const BLACK: Self[src]

pub const GRAY: Self[src]

pub const TRANSPARENT_WHITE: Self[src]

pub const TRANSPARENT_BLACK: Self[src]

pub const RED: Self[src]

pub const GREEN: Self[src]

pub const BLUE: Self[src]

pub const CYAN: Self[src]

pub const MAGENTA: Self[src]

pub const YELLOW: Self[src]

impl<T: ColorComponent> Color<T>[src]

pub fn rgb(r: T, g: T, b: T) -> Self[src]

pub fn rgba(r: T, g: T, b: T, a: T) -> Self[src]

pub fn convert<U: ColorComponent>(self) -> Color<U>[src]

Trait Implementations

impl<T: ColorComponent + ApproxEq> ApproxEq for Color<T>[src]

impl<T: Clone> Clone for Color<T>[src]

impl<T: Copy> Copy for Color<T>[src]

impl<T: Debug> Debug for Color<T>[src]

impl<T: ColorComponent> Deref for Color<T>[src]

type Target = [T; 4]

The resulting type after dereferencing.

impl<T: ColorComponent> DerefMut for Color<T>[src]

impl<'de, T> Deserialize<'de> for Color<T> where
    T: Deserialize<'de>, 
[src]

impl<T: ColorComponent> Display for Color<T>[src]

impl<T: ColorComponent + Eq> Eq for Color<T>[src]

impl<T: ColorComponent + Eq> PartialEq<Color<T>> for Color<T>[src]

impl<T> Schematic for Color<T> where
    T: Schematic + 'static,
    T: Schematic + 'static,
    T: Schematic + 'static,
    T: Schematic + 'static,
    T: Schematic
[src]

impl<T> Serialize for Color<T> where
    T: Serialize
[src]

impl<T> Trans for Color<T> where
    T: Trans,
    T: Trans,
    T: Trans,
    T: Trans
[src]

Auto Trait Implementations

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

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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.

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