Struct gecl::Rgba[][src]

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

Fields

r: Tg: Tb: Ta: T

Implementations

impl<T> Rgba<T>[src]

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

pub fn map<R>(self, f: impl FnMut(T) -> R) -> Rgba<R>[src]

pub fn values(value: u32, alpha: T) -> Rgba<T> where
    T: Values, 
[src]

impl<T: ToPrimitive> Rgba<T>[src]

pub fn cast<U: NumCast>(self) -> Option<Rgba<U>>[src]

Trait Implementations

impl<T, U> Add<U> for Rgba<T> where
    T: Add<T, Output = T>,
    U: Into<Self>, 
[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: U) -> Self[src]

Performs the + operation. Read more

impl<T, U> AddAssign<U> for Rgba<T> where
    T: AddAssign<T>,
    U: Into<Self>, 
[src]

fn add_assign(&mut self, rhs: U)[src]

Performs the += operation. Read more

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

fn clone(&self) -> Rgba<T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

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

Formats the value using the given formatter. Read more

impl<T> Div<T> for Rgba<T> where
    T: Div<T, Output = T> + Copy
[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: T) -> Self[src]

Performs the / operation. Read more

impl<T> DivAssign<T> for Rgba<T> where
    T: DivAssign<T> + Copy
[src]

fn div_assign(&mut self, rhs: T)[src]

Performs the /= operation. Read more

impl<T: Copy> From<[T; 4]> for Rgba<T>[src]

fn from(src: [T; 4]) -> Rgba<T>[src]

Performs the conversion.

impl<T> From<(T, T, T, T)> for Rgba<T>[src]

fn from(src: (T, T, T, T)) -> Rgba<T>[src]

Performs the conversion.

impl<T> Mul<T> for Rgba<T> where
    T: Mul<T, Output = T> + Copy
[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: T) -> Self[src]

Performs the * operation. Read more

impl<T> MulAssign<T> for Rgba<T> where
    T: MulAssign<T> + Copy
[src]

fn mul_assign(&mut self, rhs: T)[src]

Performs the *= operation. Read more

impl<T> PartialEq<[T; 4]> for Rgba<T> where
    T: PartialEq
[src]

fn eq(&self, other: &[T; 4]) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T> PartialEq<(T, T, T, T)> for Rgba<T> where
    T: PartialEq
[src]

fn eq(&self, other: &(T, T, T, T)) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: PartialEq> PartialEq<Rgba<T>> for Rgba<T>[src]

fn eq(&self, other: &Rgba<T>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rgba<T>) -> bool[src]

This method tests for !=.

impl<T, U> Sub<U> for Rgba<T> where
    T: Sub<T, Output = T>,
    U: Into<Self>, 
[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: U) -> Self[src]

Performs the - operation. Read more

impl<T, U> SubAssign<U> for Rgba<T> where
    T: SubAssign<T>,
    U: Into<Self>, 
[src]

fn sub_assign(&mut self, rhs: U)[src]

Performs the -= operation. Read more

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

impl<T: Eq> Eq for Rgba<T>[src]

impl<T> StructuralEq for Rgba<T>[src]

impl<T> StructuralPartialEq for Rgba<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Rgba<T> where
    T: RefUnwindSafe

impl<T> Send for Rgba<T> where
    T: Send

impl<T> Sync for Rgba<T> where
    T: Sync

impl<T> Unpin for Rgba<T> where
    T: Unpin

impl<T> UnwindSafe for Rgba<T> where
    T: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

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.

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

Performs the conversion.

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.

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

Performs the conversion.