Struct ColorRGBAOf

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

Fields§

§r: T

Red

§g: T

Green

§b: T

Blue

§a: T

Alpha

Implementations§

Source§

impl<T> ColorRGBAOf<T>

Source

pub const R_INDEX: usize = 0usize

Red

Source

pub const G_INDEX: usize = 1usize

Green

Source

pub const B_INDEX: usize = 2usize

Blue

Source

pub const A_INDEX: usize = 3usize

Alpha

Source

pub const fn new(red: T, green: T, blue: T, alpha: T) -> Self

Source

pub const fn rgba(red: T, green: T, blue: T, alpha: T) -> Self

Source

pub const fn rgb(red: T, green: T, blue: T) -> Self
where T: DefaultRange,

Source

pub const fn gray(rgb: T) -> Self
where T: DefaultRange + Copy,

Source

pub fn rgba_ref(&self) -> &[T; 4]

Source

pub fn rgba_mut(&mut self) -> &mut [T; 4]

Source

pub fn rgb_ref(&self) -> &[T; 3]

Source

pub fn rgb_mut(&mut self) -> &mut [T; 3]

Source

pub fn splat_rgba(rgba: T) -> Self
where T: Clone,

Source

pub fn splat_rgb(rgb: T) -> Self
where T: Clone + DefaultRange,

Alpha is at max

Source

pub fn splat_rgb_with_a(rgb: T, a: T) -> Self
where T: Clone,

Source

pub fn r(&self) -> T
where T: Copy,

Red

Source

pub fn with_r(self, r: T) -> Self
where T: Copy,

Red

Source

pub fn set_r(&mut self, r: T) -> &mut Self

Red

Source

pub fn replace_r(self, r: T) -> T

Red

Source

pub fn g(&self) -> T
where T: Copy,

Green

Source

pub fn with_g(self, g: T) -> Self
where T: Copy,

Green

Source

pub fn set_g(&mut self, g: T) -> &mut Self

Green

Source

pub fn replace_g(self, g: T) -> T

Green

Source

pub fn b(&self) -> T
where T: Copy,

Blue

Source

pub fn with_b(self, b: T) -> Self
where T: Copy,

Blue

Source

pub fn set_b(&mut self, b: T) -> &mut Self

Blue

Source

pub fn replace_b(self, b: T) -> T

Blue

Source

pub fn a(&self) -> T
where T: Copy,

Alpha

Source

pub fn with_a(self, a: T) -> Self
where T: Copy,

Alpha

Source

pub fn set_a(&mut self, a: T) -> &mut Self

Alpha

Source

pub fn replace_a(self, a: T) -> T

Alpha

Source

pub fn unpack_rgb(self) -> (T, T, T)

Source

pub fn unpack_rgba(self) -> (T, T, T, T)

Trait Implementations§

Source§

impl<T> Absolute for ColorRGBAOf<T>
where T: Absolute,

Source§

fn abs(self) -> Self

Source§

impl<T> Add<T> for ColorRGBAOf<T>
where T: Add<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Add>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for ColorRGBAOf<T>
where T: Add<T>,

Source§

type Output = ColorRGBAOf<<T as Add>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> AddAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: AddAssign + Copy,

Source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
Source§

impl<T> AddAssign for ColorRGBAOf<T>
where T: AddAssign,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T> ArrayLike<T, 4> for ColorRGBAOf<T>

Source§

type WithType<T2> = ColorRGBAOf<T2>

Source§

fn array(&self) -> &[T; 4]

Source§

fn array_mut(&mut self) -> &mut [T; 4]

Source§

const DIMENSION: usize = N

Source§

fn splat(value: T) -> Self
where T: Clone,

Source§

fn map<U, F>(self, f: F) -> Self::WithType<U>
where F: FnMut(T) -> U,

Source§

fn map_with<U, T2, F>( self, other: Self::WithType<T2>, f: F, ) -> Self::WithType<U>
where F: FnMut(T, T2) -> U,

Source§

fn any<P>(&self, p: P) -> bool
where P: FnMut(&T) -> bool,

True if the predicate is true for at least one component
Source§

fn any_with<T2, P>(&self, other: Self::WithType<T2>, p: P) -> bool
where P: FnMut(&T, &T2) -> bool,

True if the predicate is true for at least one component
Source§

fn all<P>(&self, p: P) -> bool
where P: FnMut(&T) -> bool,

True if the predicate is true for all component
Source§

fn all_with<T2, P>(&self, other: &Self::WithType<T2>, p: P) -> bool
where P: FnMut(&T, &T2) -> bool,

True if the predicate is true for all component
Source§

fn for_each<F>(&self, f: F)
where F: FnMut(&T),

Source§

fn for_each_mut<F>(&mut self, f: F)
where F: FnMut(&mut T),

Source§

fn slice(&self) -> &[T]

Source§

fn slice_mut(&mut self) -> &mut [T]

Source§

impl<T> AsMut<[T; 4]> for ColorRGBAOf<T>

Source§

fn as_mut(&mut self) -> &mut [T; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsRef<[T; 4]> for ColorRGBAOf<T>

Source§

fn as_ref(&self) -> &[T; 4]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> Binary for ColorRGBAOf<T>
where T: Binary,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> BitAnd<T> for ColorRGBAOf<T>
where T: BitAnd<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as BitAnd>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<T> BitAnd for ColorRGBAOf<T>
where T: BitAnd<T>,

Source§

type Output = ColorRGBAOf<<T as BitAnd>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<T> BitAndAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: BitAndAssign + Copy,

Source§

fn bitand_assign(&mut self, rhs: &Self)

Performs the &= operation. Read more
Source§

impl<T> BitAndAssign for ColorRGBAOf<T>
where T: BitAndAssign,

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<T> BitOr<T> for ColorRGBAOf<T>
where T: BitOr<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as BitOr>::Output>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<T> BitOr for ColorRGBAOf<T>
where T: BitOr<T>,

Source§

type Output = ColorRGBAOf<<T as BitOr>::Output>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<T> BitOrAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: BitOrAssign + Copy,

Source§

fn bitor_assign(&mut self, rhs: &Self)

Performs the |= operation. Read more
Source§

impl<T> BitOrAssign for ColorRGBAOf<T>
where T: BitOrAssign,

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl<T> BitXor<T> for ColorRGBAOf<T>
where T: BitXor<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as BitXor>::Output>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T> BitXor for ColorRGBAOf<T>
where T: BitXor<T>,

Source§

type Output = ColorRGBAOf<<T as BitXor>::Output>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T> BitXorAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: BitXorAssign + Copy,

Source§

fn bitxor_assign(&mut self, rhs: &Self)

Performs the ^= operation. Read more
Source§

impl<T> BitXorAssign for ColorRGBAOf<T>
where T: BitXorAssign,

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl<T, CastToOut> CastIntoComposite<CastToOut> for ColorRGBAOf<T>
where T: CastIntoComposite<CastToOut>,

Source§

type Output = ColorRGBAOf<<T as CastIntoComposite<CastToOut>>::Output>

Source§

fn cast_into_composite(self) -> Self::Output

Might lose some precision. Same semantics as the as keyword: 4f32 as u64
Source§

impl<T> Clone for ColorRGBAOf<T>
where T: Clone,

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for ColorRGBAOf<T>
where T: Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> Default for ColorRGBAOf<T>
where T: DefaultRange,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de, T> Deserialize<'de> for ColorRGBAOf<T>
where [T; 4]: Deserialize<'de>,

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Display for ColorRGBAOf<T>
where T: Display,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> Div<T> for ColorRGBAOf<T>
where T: Div<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Div>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div for ColorRGBAOf<T>
where T: Div<T>,

Source§

type Output = ColorRGBAOf<<T as Div>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> DivAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: DivAssign + Copy,

Source§

fn div_assign(&mut self, rhs: &Self)

Performs the /= operation. Read more
Source§

impl<T> DivAssign for ColorRGBAOf<T>
where T: DivAssign,

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<T> From<[T; 3]> for ColorRGBAOf<T>
where T: DefaultRange,

Source§

fn from(value: [T; 3]) -> Self

Converts to this type from the input type.
Source§

impl<T> From<[T; 4]> for ColorRGBAOf<T>

Source§

fn from(value: [T; 4]) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T)> for ColorRGBAOf<T>
where T: DefaultRange,

Source§

fn from(value: (T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T)> for ColorRGBAOf<T>

Source§

fn from(value: (T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ColorRGBAOf<T>> for [T; 3]

Source§

fn from(value: ColorRGBAOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ColorRGBAOf<T>> for [T; 4]

Source§

fn from(value: ColorRGBAOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ColorRGBAOf<T>> for (T, T, T)

Source§

fn from(value: ColorRGBAOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ColorRGBAOf<T>> for (T, T, T, T)

Source§

fn from(value: ColorRGBAOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ColorRGBAOf<T>> for Vector3<T>

Source§

fn from(value: ColorRGBAOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ColorRGBAOf<T>> for Vector4<T>

Source§

fn from(value: ColorRGBAOf<T>) -> Self

Converts to this type from the input type.
Source§

impl From<ColorRGBAOf<f32>> for ColorHSLA

Source§

fn from(value: Color) -> Self

Converts to this type from the input type.
Source§

impl From<ColorRGBAOf<f32>> for ColorByte

Source§

fn from(value: Color) -> Self

Converts to this type from the input type.
Source§

impl From<ColorRGBAOf<u8>> for ColorHSLA

Source§

fn from(value: ColorRGBAByte) -> Self

Converts to this type from the input type.
Source§

impl From<ColorRGBAOf<u8>> for Color

Source§

fn from(value: ColorByte) -> Self

Converts to this type from the input type.
Source§

impl<T> From<T> for ColorRGBAOf<T>
where T: Copy,

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Vector<T, 3>> for ColorRGBAOf<T>
where T: DefaultRange,

Source§

fn from(value: Vector3<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Vector<T, 4>> for ColorRGBAOf<T>

Source§

fn from(value: Vector4<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, Idx> Get<Idx> for ColorRGBAOf<T>
where [T; 4]: Get<Idx>,

Source§

type Output = <[T; 4] as Get<Idx>>::Output

Source§

fn try_get(&self, index: Idx) -> Result<&Self::Output, ()>

Source§

fn get(&self, index: Idx) -> Option<&Self::Output>

Source§

unsafe fn get_unchecked(&self, index: Idx) -> &Self::Output

Source§

fn get_or_panic(&self, index: Idx) -> &Self::Output

Source§

fn is_index_valid(&self, index: Idx) -> bool

True if get(index) return Some, false otherwise.
Source§

fn is_index_invalid(&self, index: Idx) -> bool

True if get(index) return None, false otherwise.
Source§

impl<T, Idx> GetManyMut<Idx> for ColorRGBAOf<T>
where [T; 4]: GetManyMut<Idx>,

Source§

fn try_get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Result<[&mut Self::Output; N], ()>

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut Self::Output; N]>

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

fn get_many_mut_or_panic<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

fn try_swap(&mut self, a: Idx, b: Idx) -> Result<(), ()>
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

fn swap(&mut self, a: Idx, b: Idx) -> bool
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

fn swap_or_panic(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

unsafe fn swap_unchecked(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

impl<T, Idx> GetMut<Idx> for ColorRGBAOf<T>
where [T; 4]: GetMut<Idx>,

Source§

fn try_get_mut(&mut self, index: Idx) -> Result<&mut Self::Output, ()>

Source§

fn get_mut(&mut self, index: Idx) -> Option<&mut Self::Output>

Source§

unsafe fn get_unchecked_mut(&mut self, index: Idx) -> &mut Self::Output

Source§

fn get_mut_or_panic(&mut self, idx: Idx) -> &mut Self::Output

Source§

fn try_replace( &mut self, index: Idx, value: Self::Output, ) -> Result<Self::Output, ()>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn try_set(&mut self, index: Idx, value: Self::Output) -> Result<(), ()>
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

fn set(&mut self, index: Idx, value: Self::Output) -> bool
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Source§

impl<T> Half for ColorRGBAOf<T>
where T: Half,

Source§

const HALF: Self

Source§

fn is_half(self) -> bool
where Self: PartialEq,

Source§

fn is_non_half(self) -> bool
where Self: PartialEq,

Source§

impl<T> Hash for ColorRGBAOf<T>
where T: Hash,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> IColor for ColorRGBAOf<T>
where Self: From<Color> + From<ColorByte> + From<ColorHSLA> + ToFloat<Output = ColorRGBAOf<float>>, T: ToCoef<Output = Coef> + FromCoef + ToFloat<Output = float> + DefaultRange + Copy + PartialEq + Default,

Source§

const TRANSPARENT: Self

Source§

const BLACK: Self

Source§

const GRAY: Self

Source§

const WHITE: Self

Source§

const RED: Self

Source§

const GREEN: Self

Source§

const BLUE: Self

Source§

const CYAN: Self

Source§

const PINK: Self

Source§

const YELLOW: Self

Source§

fn rgba_from_bytes(r: u8, g: u8, b: u8, a: u8) -> Self

Source§

fn rgba_from_bytes_slice(rgba: &[u8]) -> Self

Source§

fn from_rgb_hex(hex: u32) -> Self

Source§

fn from_rgba_hex(hex: u32) -> Self

Source§

fn to_rgba_hex(self) -> u32

Cast to color byte and convert to u32 using : #RRGGBBAA
Source§

fn to_rgba_hex_string(self) -> String

Cast to color byte and format the color : #RRGGBBAA
Source§

impl<T, Idx> Index<Idx> for ColorRGBAOf<T>
where [T; 4]: Index<Idx>,

Source§

type Output = <[T; 4] as Index<Idx>>::Output

The returned type after indexing.
Source§

fn index(&self, index: Idx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, Idx> IndexMut<Idx> for ColorRGBAOf<T>
where [T; 4]: IndexMut<Idx>,

Source§

fn index_mut(&mut self, index: Idx) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, T> IntoIterator for &'a ColorRGBAOf<T>
where &'a [T; 4]: IntoIterator,

Source§

type Item = <&'a [T; 4] as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <&'a [T; 4] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a mut ColorRGBAOf<T>
where &'a mut [T; 4]: IntoIterator,

Source§

type Item = <&'a mut [T; 4] as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <&'a mut [T; 4] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoIterator for ColorRGBAOf<T>

Source§

type Item = <[T; 4] as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <[T; 4] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> LowerExp for ColorRGBAOf<T>
where T: LowerExp,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> LowerHex for ColorRGBAOf<T>
where T: LowerHex,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> MaxValue for ColorRGBAOf<T>
where T: MaxValue,

Source§

const MAX: Self

Source§

fn is_max_value(&self) -> bool
where Self: PartialEq,

Source§

fn is_non_max_value(&self) -> bool
where Self: PartialEq,

Source§

impl<T> MinValue for ColorRGBAOf<T>
where T: MinValue,

Source§

const MIN: Self

Source§

fn is_min_value(&self) -> bool
where Self: PartialEq,

Source§

fn is_not_min_value(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Mul<T> for ColorRGBAOf<T>
where T: Mul<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Mul>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul for ColorRGBAOf<T>
where T: Mul<T>,

Source§

type Output = ColorRGBAOf<<T as Mul>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> MulAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: MulAssign + Copy,

Source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
Source§

impl<T> MulAssign for ColorRGBAOf<T>
where T: MulAssign,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<T> NaNValue for ColorRGBAOf<T>
where T: NaNValue,

Source§

const NAN: Self

Source§

fn is_nan(&self) -> bool
where Self: PartialEq,

Source§

fn is_not_nan(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Neg for ColorRGBAOf<T>
where T: Neg,

Source§

type Output = ColorRGBAOf<<T as Neg>::Output>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T> Not for ColorRGBAOf<T>
where T: Not,

Source§

type Output = ColorRGBAOf<<T as Not>::Output>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<T> Octal for ColorRGBAOf<T>
where T: Octal,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> One for ColorRGBAOf<T>
where T: One,

Source§

const ONE: Self

The neutral element of the multiplication such that x * X::ONE = x
Source§

fn one() -> Self
where Self: Sized,

Source§

fn set_one(&mut self) -> &mut Self

Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Source§

fn is_non_one(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Ord for ColorRGBAOf<T>
where T: Ord,

Source§

fn cmp(&self, rhs: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> PartialEq for ColorRGBAOf<T>
where T: PartialEq,

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialOrd for ColorRGBAOf<T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Pointer for ColorRGBAOf<T>
where T: Pointer,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> PrefixBillion for ColorRGBAOf<T>
where T: PrefixBillion,

Source§

const BILLION: Self

10^9 = 1_000_000_000
Source§

fn billion(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^9 = 1_000_000_000
Source§

impl<T> PrefixCenti for ColorRGBAOf<T>
where T: PrefixCenti,

Source§

const CENTI: Self

10^-2 = 1/100
Source§

fn centi(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-2 = 1/100
Source§

impl<T> PrefixDeca for ColorRGBAOf<T>
where T: PrefixDeca,

Source§

const DECA: Self

10^1 = 10
Source§

fn deca(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^1 = 10
Source§

impl<T> PrefixDecade for ColorRGBAOf<T>
where T: PrefixDecade,

Source§

const DECADE: Self

10^1 = 10
Source§

fn decade(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^1 = 10
Source§

impl<T> PrefixDeci for ColorRGBAOf<T>
where T: PrefixDeci,

Source§

const DECI: Self

10^-1 = 1/10
Source§

fn deci(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-1 = 1/10
Source§

impl<T> PrefixFemto for ColorRGBAOf<T>
where T: PrefixFemto,

Source§

const FEMTO: Self

10^-15 = 1/1_000_000_000_000_000
Source§

fn femto(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-15 = 1/1_000_000_000_000_000
Source§

impl<T> PrefixGiga for ColorRGBAOf<T>
where T: PrefixGiga,

Source§

const GIGA: Self

10^9 = 1_000_000_000
Source§

fn giga(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^9 = 1_000_000_000
Source§

impl<T> PrefixHecto for ColorRGBAOf<T>
where T: PrefixHecto,

Source§

const HECTO: Self

10^2 = 100
Source§

fn hecto(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^2 = 100
Source§

impl<T> PrefixHundred for ColorRGBAOf<T>
where T: PrefixHundred,

Source§

const HUNDRED: Self

10^2 = 100
Source§

fn hundred(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^2 = 100
Source§

impl<T> PrefixKilo for ColorRGBAOf<T>
where T: PrefixKilo,

Source§

const KILO: Self

10^3 = 1_000
Source§

fn kilo(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^3 = 1_000
Source§

impl<T> PrefixMega for ColorRGBAOf<T>
where T: PrefixMega,

Source§

const MEGA: Self

10^6 = 1_000_000
Source§

fn mega(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^6 = 1_000_000
Source§

impl<T> PrefixMicro for ColorRGBAOf<T>
where T: PrefixMicro,

Source§

const MICRO: Self

10^-6 = 1/1_000_000
Source§

fn micro(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-6 = 1/1_000_000
Source§

impl<T> PrefixMilli for ColorRGBAOf<T>
where T: PrefixMilli,

Source§

const MILLI: Self

10^-3 = 1/1_000
Source§

fn milli(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-3 = 1/1_000
Source§

impl<T> PrefixMillion for ColorRGBAOf<T>
where T: PrefixMillion,

Source§

const MILLION: Self

10^6 = 1_000_000
Source§

fn million(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^6 = 1_000_000
Source§

impl<T> PrefixNano for ColorRGBAOf<T>
where T: PrefixNano,

Source§

const NANO: Self

10^-9 = 1/1_000_000_000
Source§

fn nano(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-9 = 1/1_000_000_000
Source§

impl<T> PrefixPeta for ColorRGBAOf<T>
where T: PrefixPeta,

Source§

const PETA: Self

10^15 = 1_000_000_000_000_000
Source§

fn peta(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^15 = 1_000_000_000_000_000
Source§

impl<T> PrefixPico for ColorRGBAOf<T>
where T: PrefixPico,

Source§

const PICO: Self

10^-12 = 1/1_000_000_000_000
Source§

fn pico(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^-12 = 1/1_000_000_000_000
Source§

impl<T> PrefixQuadrillion for ColorRGBAOf<T>

Source§

const QUADRILLION: Self

10^15 = 1_000_000_000_000_000
Source§

fn quadrillion(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^15 = 1_000_000_000_000_000
Source§

impl<T> PrefixTera for ColorRGBAOf<T>
where T: PrefixTera,

Source§

const TERA: Self

10^12 = 1_000_000_000_000
Source§

fn tera(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^12 = 1_000_000_000_000
Source§

impl<T> PrefixThousand for ColorRGBAOf<T>
where T: PrefixThousand,

Source§

const THOUSAND: Self

10^3 = 1_000
Source§

fn thousand(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^3 = 1_000
Source§

impl<T> PrefixTrillion for ColorRGBAOf<T>
where T: PrefixTrillion,

Source§

const TRILLION: Self

10^12 = 1_000_000_000_000
Source§

fn trillion(self) -> Self
where Self: Mul<Self, Output = Self>,

multiply by 10^12 = 1_000_000_000_000
Source§

impl<T> Product for ColorRGBAOf<T>
where Self: One + Mul<Self, Output = Self>,

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<T> Rem<T> for ColorRGBAOf<T>
where T: Rem<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Rem>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<T> Rem for ColorRGBAOf<T>
where T: Rem<T>,

Source§

type Output = ColorRGBAOf<<T as Rem>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<T> RemAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: RemAssign + Copy,

Source§

fn rem_assign(&mut self, rhs: &Self)

Performs the %= operation. Read more
Source§

impl<T> RemAssign for ColorRGBAOf<T>
where T: RemAssign,

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<T> Serialize for ColorRGBAOf<T>

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T> Shl<T> for ColorRGBAOf<T>
where T: Shl<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Shl>::Output>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<T> Shl for ColorRGBAOf<T>
where T: Shl<T>,

Source§

type Output = ColorRGBAOf<<T as Shl>::Output>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: Self) -> Self::Output

Performs the << operation. Read more
Source§

impl<T> ShlAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: ShlAssign + Copy,

Source§

fn shl_assign(&mut self, rhs: &Self)

Performs the <<= operation. Read more
Source§

impl<T> ShlAssign for ColorRGBAOf<T>
where T: ShlAssign,

Source§

fn shl_assign(&mut self, rhs: Self)

Performs the <<= operation. Read more
Source§

impl<T> Shr<T> for ColorRGBAOf<T>
where T: Shr<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Shr>::Output>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T> Shr for ColorRGBAOf<T>
where T: Shr<T>,

Source§

type Output = ColorRGBAOf<<T as Shr>::Output>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: Self) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T> ShrAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: ShrAssign + Copy,

Source§

fn shr_assign(&mut self, rhs: &Self)

Performs the >>= operation. Read more
Source§

impl<T> ShrAssign for ColorRGBAOf<T>
where T: ShrAssign,

Source§

fn shr_assign(&mut self, rhs: Self)

Performs the >>= operation. Read more
Source§

impl<T> Sub<T> for ColorRGBAOf<T>
where T: Sub<T> + Copy,

Source§

type Output = ColorRGBAOf<<T as Sub>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for ColorRGBAOf<T>
where T: Sub<T>,

Source§

type Output = ColorRGBAOf<<T as Sub>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> SubAssign<&ColorRGBAOf<T>> for ColorRGBAOf<T>
where T: SubAssign + Copy,

Source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
Source§

impl<T> SubAssign for ColorRGBAOf<T>
where T: SubAssign,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T> Sum for ColorRGBAOf<T>
where Self: Zero + Add<Self, Output = Self>,

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<T> ToAngle for ColorRGBAOf<T>
where T: ToAngle,

Source§

type Output = ColorRGBAOf<<T as ToAngle>::Output>

Source§

fn degree(self) -> Self::Output

Source§

fn radian(self) -> Self::Output

Source§

fn turn(self) -> Self::Output

Source§

impl<T> ToColorRep for ColorRGBAOf<T>
where Self: From<Color> + From<ColorByte> + From<ColorHSLA> + ToFloat<Output = ColorRGBAOf<float>>, T: ToCoef<Output = Coef> + FromCoef + ToFloat<Output = float> + DefaultRange + Copy + PartialEq + Default,

Source§

impl<T> ToSigned for ColorRGBAOf<T>
where T: ToSigned,

Source§

type Output = ColorRGBAOf<<T as ToSigned>::Output>

The signed equivalence
Source§

fn to_signed(self) -> Self::Output

Source§

impl<T> ToTime for ColorRGBAOf<T>
where T: ToTime,

Source§

type Output = ColorRGBAOf<<T as ToTime>::Output>

Source§

fn ms(self) -> Self::Output

Source§

fn s(self) -> Self::Output

Source§

fn mins(self) -> Self::Output

With an s to avoid the confusion with the min function
Source§

fn hour(self) -> Self::Output

Source§

fn day(self) -> Self::Output

Source§

impl<T> ToUnsigned for ColorRGBAOf<T>
where T: ToUnsigned,

Source§

type Output = ColorRGBAOf<<T as ToUnsigned>::Output>

The unsigned equivalence
Source§

fn to_unsigned(self) -> Self::Output

Source§

impl<T> UpperExp for ColorRGBAOf<T>
where T: UpperExp,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> UpperHex for ColorRGBAOf<T>
where T: UpperHex,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> Zero for ColorRGBAOf<T>
where T: Zero,

Source§

const ZERO: Self

The absorbing element of the multiplication such that x * X::ZERO = X::ZERO
Source§

fn zero() -> Self

Source§

fn set_zero(&mut self) -> &mut Self

Source§

fn is_zero(&self) -> bool
where Self: PartialEq,

Source§

fn is_non_zero(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Copy for ColorRGBAOf<T>
where T: Copy,

Source§

impl<T> Eq for ColorRGBAOf<T>
where T: Eq,

Auto Trait Implementations§

§

impl<T> Freeze for ColorRGBAOf<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for ColorRGBAOf<T>
where T: RefUnwindSafe,

§

impl<T> Send for ColorRGBAOf<T>
where T: Send,

§

impl<T> Sync for ColorRGBAOf<T>
where T: Sync,

§

impl<T> Unpin for ColorRGBAOf<T>
where T: Unpin,

§

impl<T> UnwindSafe for ColorRGBAOf<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S, T, const N: usize> ArrayLikeExtension<T, N> for S
where S: ArrayLike<T, N>,

Source§

fn min_element(&self) -> &T
where T: PartialOrd,

Source§

fn max_element(&self) -> &T
where T: PartialOrd,

Source§

fn min_element_idx(&self) -> usize
where T: PartialOrd,

Source§

fn max_element_idx(&self) -> usize
where T: PartialOrd,

Source§

fn to_array_1d(self) -> [T; 1]
where T: Default,

Fill non existing component with Default
Source§

fn to_array_1d_filled(self, fill: T) -> [T; 1]
where T: Clone,

Fill non existing component with the Cloned given value
Source§

fn to_array_2d(self) -> [T; 2]
where T: Default,

Fill non existing component with Default
Source§

fn to_array_2d_filled(self, fill: T) -> [T; 2]
where T: Clone,

Fill non existing component with the Cloned given value
Source§

fn to_array_3d(self) -> [T; 3]
where T: Default,

Fill non existing component with Default
Source§

fn to_array_3d_filled(self, fill: T) -> [T; 3]
where T: Clone,

Fill non existing component with the Cloned given value
Source§

fn to_array_4d(self) -> [T; 4]
where T: Default,

Fill non existing component with Default
Source§

fn to_array_4d_filled(self, fill: T) -> [T; 4]
where T: Clone,

Fill non existing component with the Cloned given value
Source§

fn to_point1(self) -> Point1
where int: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point2(self) -> Point2
where int: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point3(self) -> Point3
where int: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point4(self) -> Point4
where int: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point1_filled(self, fill: int) -> Point1
where int: From<T>,

Fill non existing component with the given value
Source§

fn to_point2_filled(self, fill: int) -> Point2
where int: From<T>,

Fill non existing component with the given value
Source§

fn to_point3_filled(self, fill: int) -> Point3
where int: From<T>,

Fill non existing component with the given value
Source§

fn to_point4_filled(self, fill: int) -> Point4
where int: From<T>,

Fill non existing component with the given value
Source§

fn to_vec1(self) -> Vec1
where float: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec2(self) -> Vec2
where float: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec3(self) -> Vec3
where float: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec4(self) -> Vec4
where float: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec1_filled(self, fill: float) -> Vec1
where float: From<T>,

Fill non existing component with the given value
Source§

fn to_vec2_filled(self, fill: float) -> Vec2
where float: From<T>,

Fill non existing component with the given value
Source§

fn to_vec3_filled(self, fill: float) -> Vec3
where float: From<T>,

Fill non existing component with the given value
Source§

fn to_vec4_filled(self, fill: float) -> Vec4
where float: From<T>,

Fill non existing component with the given value
Source§

fn to_vector1(self) -> Vector1<T>
where T: Default,

Fill non existing component with Default
Source§

fn to_vector2(self) -> Vector2<T>
where T: Default,

Fill non existing component with Default
Source§

fn to_vector3(self) -> Vector3<T>
where T: Default,

Fill non existing component with Default
Source§

fn to_vector4(self) -> Vector4<T>
where T: Default,

Fill non existing component with Default
Source§

fn to_vector1_filled(self, fill: T) -> Vector1<T>
where T: Clone,

Fill non existing component with the given value
Source§

fn to_vector2_filled(self, fill: T) -> Vector2<T>
where T: Clone,

Fill non existing component with the given value
Source§

fn to_vector3_filled(self, fill: T) -> Vector3<T>
where T: Clone,

Fill non existing component with the given value
Source§

fn to_vector4_filled(self, fill: T) -> Vector4<T>
where T: Clone,

Fill non existing component with the given value
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dest> CastFrom<Dest> for Src
where Dest: CastInto<Src>,

Source§

fn cast_from(value: Dest) -> Src

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Decrease for T
where T: One + Sub<Output = T> + SubAssign + Copy,

Source§

fn decrease(&mut self)

The decrement x-- operator
Source§

fn decrease_checked(&mut self) -> Result<(), ()>

The increment x-- operator
Source§

fn can_decrease(&self) -> bool

Do the current value have a predecessor. Read more
Source§

fn predecessor(self) -> Self

Return the predecessor self - 1
Source§

fn predecessor_checked(&mut self) -> Result<Self, ()>

Return the predecessor self - 1
Source§

fn have_predecessor(self) -> bool

Do the current value have a predecessor. Read more
Source§

impl<T> DefaultIsTripleUnderscore for T
where T: Default,

Source§

fn ___() -> T

The Self::default() method. Read more
Source§

impl<C, T, const N: usize> ExtensionAsArray<T, N> for C
where C: AsRef<[T; N]>,

Source§

fn as_array(&self) -> &[T; N]

Source§

impl<C, T, const N: usize> ExtensionAsArrayMut<T, N> for C
where C: AsMut<[T; N]>,

Source§

fn as_array_mut(&mut self) -> &mut [T; N]

Source§

impl<C, T, const N: usize> ExtensionFromArray<T, N> for C
where C: From<[T; N]>,

Source§

fn from_array(value: [T; N]) -> Self

Source§

impl<C, T, const N: usize> ExtensionToArray<T, N> for C
where C: Into<[T; N]>,

Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Increase for T
where T: One + Add<Output = T> + AddAssign + Copy,

Source§

fn increase(&mut self)

The increment x++ operator
Source§

fn increase_checked(&mut self) -> Result<(), ()>

The increment x++ operator
Source§

fn can_increase(&self) -> bool

Do the current value have a successor. Read more
Source§

fn successor(self) -> Self

Return the successor self + 1
Source§

fn successor_checked(&mut self) -> Result<Self, ()>

Return the successor self + 1
Source§

fn have_successor(self) -> bool

Do the current value have a successor. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Lerpable for T
where T: Add<Output = T> + Mul<f32, Output = T>,

Source§

fn lerp_unchecked(self, dest: T, coef: f32) -> T

Not restricted between [0..1]
Source§

fn lerp(self, dest: Self, coef: float) -> Self

Restricted between [0..1]
Source§

impl<T> PartialOrdExtension for T
where T: PartialOrd,

Source§

fn max_partial(self, other: Self) -> Self
where Self: Sized,

Source§

fn min_partial(self, other: Self) -> Self
where Self: Sized,

Source§

fn clamp_partial(self, min: Self, max: Self) -> Self
where Self: Sized,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PositiveOrNegative for T
where T: Zero + PartialOrd,

Source§

impl<T> SplatCoord1 for T
where T: Copy,

Source§

fn splat1(self) -> Vector1<Self>

Source§

impl<T> SplatCoord2 for T
where T: Copy,

Source§

fn splat2(self) -> Vector2<Self>

Source§

impl<T> SplatCoord3 for T
where T: Copy,

Source§

fn splat3(self) -> Vector3<Self>

Source§

impl<T> SplatCoord4 for T
where T: Copy,

Source§

fn splat4(self) -> Vector4<Self>

Source§

impl<T> TakeHalf for T
where T: Number,

Source§

fn take_half(self) -> T

Half the current value
Source§

impl<T> ToCoef for T

Source§

impl<T> ToDebug for T
where T: Debug,

Source§

impl<T> ToF32 for T

Source§

impl<T> ToF64 for T

Source§

impl<T> ToFloat for T

Source§

impl<T> ToI16 for T

Source§

impl<T> ToI32 for T

Source§

impl<T> ToI64 for T

Source§

impl<T> ToI8 for T

Source§

impl<T> ToISize for T

Source§

impl<T> ToInt for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToU16 for T

Source§

impl<T> ToU32 for T

Source§

impl<T> ToU64 for T

Source§

impl<T> ToU8 for T

Source§

impl<T> ToUInt for T

Source§

impl<T> ToUSize for T

Source§

impl<T, const N: usize> ToVectorFilled<T, N> for T
where T: Copy,

Source§

fn to_vector_filled(self, _: T) -> Vector<T, N>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> Two for T
where T: One + Add<Output = T>,

Source§

fn two() -> T

Source§

fn is_two(&self) -> bool
where Self: PartialEq<Self>,

Source§

fn is_non_two(&self) -> bool
where Self: PartialEq<Self>,

Source§

impl<T> ArithmeticNegative for T
where T: Neg<Output = T>,

Source§

impl<T> BitArithmetic for T
where T: Copy + ShlAssign + BitOr<Output = T> + Shl<Output = T> + BitOrAssign + BitAnd<Output = T> + BitAndAssign + BitXor<Output = T> + BitXorAssign + Not<Output = T> + Shr<Output = T>,

Source§

impl<T, T2> CastInto<T> for T2
where T2: CastIntoComposite<T, Output = T>,

Source§

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

Source§

impl<T> Number for T

Source§

impl<T> NumberArithmetic for T
where T: MulAssign + Product + Div<Output = T> + UnitArithmetic + DivAssign + Rem<Output = T> + Mul<Output = T> + RemAssign,

Source§

impl<T> UnitArithmetic for T
where T: Add<Output = T> + AddAssign + Sum + Sub<Output = T> + Copy + SubAssign + Zero,