Skip to main content

RgbaOf

Struct RgbaOf 

Source
#[repr(C)]
pub struct RgbaOf<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> RgbaOf<T>

Source

pub const LEN: usize = 4usize

Source

pub const fn from_array(array: [T; 4]) -> RgbaOf<T>

Source

pub const fn to_array(self) -> [T; 4]

Source

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

Source

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

Source

pub fn max(self, other: RgbaOf<T>) -> RgbaOf<T>
where RgbaOf<T>: Max,

Max function in a component way

Can cause a panic for grid if the size mismatch

Source

pub fn min(self, other: RgbaOf<T>) -> RgbaOf<T>
where RgbaOf<T>: Min,

Min function in a component way

Can cause a panic for grid if the size mismatch

Source

pub fn abs(self) -> <RgbaOf<T> as Abs>::Output
where RgbaOf<T>: Abs,

Absolute value in a component way.

§Overflow behavior

The absolute value of iX::MIN cannot be represented as an iX, and attempting to calculate it will cause an overflow. This means that code in debug mode will trigger a panic on this case and optimized code will return iX::MIN without a panic.

Can cause a panic for grid if the size mismatch

Source

pub fn mix<C>(self, other: RgbaOf<T>, coef: C) -> RgbaOf<T>
where RgbaOf<T>: Mix<C>, C: Float,

Mix function in a component way

The coef is clamped between 0.0..1.

  1. => self,
  2. => dest.

Can cause a panic for grid if the size mismatch

Source

pub fn mix_unchecked<C>(self, other: RgbaOf<T>, coef: C) -> RgbaOf<T>
where RgbaOf<T>: Mix<C>, C: Float,

Mix function in a component way

The coef is not clamped between 0.0..1.

  1. => self,
  2. => dest.

Can cause a panic for grid if the size mismatch

Source

pub fn clamp(self, min_val: RgbaOf<T>, max_val: RgbaOf<T>) -> RgbaOf<T>
where RgbaOf<T>: Clamp,

Clamp function in a component way

Clamps self between min_val and max_val (inclusive)

Can cause a panic for grid if the size mismatch

Source§

impl<T> RgbaOf<T>

Source

pub const R_INDEX: usize = 0

Red

Source

pub const G_INDEX: usize = 1

Green

Source

pub const B_INDEX: usize = 2

Blue

Source

pub const A_INDEX: usize = 3

Alpha

Source

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

Source

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

Source

pub const fn rgb(red: T, green: T, blue: T) -> RgbaOf<T>
where T: RangeDefault,

Alpha is at max

Source

pub const fn gray(rgb: T) -> RgbaOf<T>
where T: RangeDefault + Copy,

Alpha is at max

Source

pub const fn splat_rgba(rgba: T) -> RgbaOf<T>
where T: Copy,

Source

pub const fn splat_rgb(rgb: T) -> RgbaOf<T>
where T: Copy + RangeDefault,

Alpha is at max

Source

pub const fn splat_rgb_with_a(rgb: T, a: T) -> RgbaOf<T>
where T: 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 r(&self) -> T
where T: Copy,

Red

Source

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

Red

Source

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

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) -> RgbaOf<T>
where T: Copy,

Green

Source

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

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) -> RgbaOf<T>
where T: Copy,

Blue

Source

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

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) -> RgbaOf<T>
where T: Copy,

Alpha

Source

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

Alpha

Source

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

Alpha

Source§

impl<T> RgbaOf<T>
where T: Primitive,

Source

pub fn to_rgba_of<R>(self) -> RgbaOf<R>
where R: Primitive + CastRangeFrom<T>,

Source

pub fn to_hsla_of<R>(self) -> HslaOf<R>
where R: Float + CastRangeFrom<T>,

Trait Implementations§

Source§

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

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> <RgbaOf<T> as Add<T>>::Output

Performs the + operation. Read more
Source§

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

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Add>::Output

Performs the + operation. Read more
Source§

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

Source§

fn add_assign(&mut self, rhs: &RgbaOf<T>)

Performs the += operation. Read more
Source§

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

Source§

fn add_assign(&mut self, rhs: RgbaOf<T>)

Performs the += operation. Read more
Source§

impl<T> Array<T, 4> for RgbaOf<T>

Source§

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

Source§

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

Source§

const DIMENSION: usize = N

Source§

fn to_array_resized<const M: usize>(self) -> [T; M]
where T: Default,

Fill non existing component with Default
Source§

fn to_array_resized_with_value<const M: usize>(self, fill: T) -> [T; M]
where T: Clone,

Fill non existing component with the Cloned given value
Source§

impl<T> ArrayWithType<T, 4> for RgbaOf<T>

Source§

type WithType<T2> = RgbaOf<T2>

Source§

impl<T> AsMut<[T; 4]> for RgbaOf<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, Policy> AsMut<RgbaOf<T>> for RgbaOfWithDefault<T, Policy>
where Policy: Constant<T>,

Source§

fn as_mut(&mut self) -> &mut RgbaOf<T>

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

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

Source§

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

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

impl<T, Policy> AsRef<RgbaOf<T>> for RgbaOfWithDefault<T, Policy>
where Policy: Constant<T>,

Source§

fn as_ref(&self) -> &RgbaOf<T>

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

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

Source§

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

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

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

Source§

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

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> <RgbaOf<T> as BitAnd<T>>::Output

Performs the & operation. Read more
Source§

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

Source§

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

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as BitAnd>::Output

Performs the & operation. Read more
Source§

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

Source§

fn bitand_assign(&mut self, rhs: &RgbaOf<T>)

Performs the &= operation. Read more
Source§

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

Source§

fn bitand_assign(&mut self, rhs: RgbaOf<T>)

Performs the &= operation. Read more
Source§

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

Source§

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

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> <RgbaOf<T> as BitOr<T>>::Output

Performs the | operation. Read more
Source§

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

Source§

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

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as BitOr>::Output

Performs the | operation. Read more
Source§

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

Source§

fn bitor_assign(&mut self, rhs: &RgbaOf<T>)

Performs the |= operation. Read more
Source§

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

Source§

fn bitor_assign(&mut self, rhs: RgbaOf<T>)

Performs the |= operation. Read more
Source§

impl<T> BitPattern for RgbaOf<T>
where T: BitPattern, [<T as BitPattern>::Bits; 4]: BitAnyPattern,

Source§

type Bits = [<T as BitPattern>::Bits; 4]

Source§

fn is_bit_pattern_valid(bits: &<RgbaOf<T> as BitPattern>::Bits) -> bool

Source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Source§

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

Source§

fn clone(&self) -> RgbaOf<T>

Returns a duplicate 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 RgbaOf<T>
where T: Debug,

Source§

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

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

impl<T> Default for RgbaOf<T>
where T: Primitive,

Source§

fn default() -> RgbaOf<T>

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

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

Source§

fn deserialize<D>( deserializer: D, ) -> Result<RgbaOf<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 RgbaOf<T>
where T: Display,

Source§

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

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

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

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> <RgbaOf<T> as Div<T>>::Output

Performs the / operation. Read more
Source§

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

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Div>::Output

Performs the / operation. Read more
Source§

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

Source§

fn div_assign(&mut self, rhs: &RgbaOf<T>)

Performs the /= operation. Read more
Source§

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

Source§

fn div_assign(&mut self, rhs: RgbaOf<T>)

Performs the /= operation. Read more
Source§

impl<T> From<[T; 3]> for RgbaOf<T>
where T: RangeDefault,

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T)> for RgbaOf<T>
where T: RangeDefault,

Source§

fn from(value: (T, T, T)) -> RgbaOf<T>

Converts to this type from the input type.
Source§

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

Source§

fn from(value: (T, T, T, T)) -> RgbaOf<T>

Converts to this type from the input type.
Source§

impl<T, Policy> From<RgbaOf<T>> for RgbaOfWithDefault<T, Policy>
where Policy: Constant<T>,

Source§

fn from(value: RgbaOf<T>) -> RgbaOfWithDefault<T, Policy>

Converts to this type from the input type.
Source§

impl<T> From<RgbaOf<T>> for Vector<T, 3>

Source§

fn from(value: RgbaOf<T>) -> Vector<T, 3>

Converts to this type from the input type.
Source§

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

Source§

fn from(value: RgbaOf<T>) -> Vector<T, 4>

Converts to this type from the input type.
Source§

impl<T, Policy> From<RgbaOfWithDefault<T, Policy>> for RgbaOf<T>
where Policy: Constant<T>,

Source§

fn from(value: RgbaOfWithDefault<T, Policy>) -> RgbaOf<T>

Converts to this type from the input type.
Source§

impl<T> From<Vector<T, 3>> for RgbaOf<T>
where T: RangeDefault,

Source§

fn from(value: Vector<T, 3>) -> RgbaOf<T>

Converts to this type from the input type.
Source§

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

Source§

fn from(value: Vector<T, 4>) -> RgbaOf<T>

Converts to this type from the input type.
Source§

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

Source§

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

Source§

fn get(&self, index: Idx) -> Option<&<RgbaOf<T> as Get<Idx>>::Output>

Returns a reference to the value.
Source§

unsafe fn get_unchecked(&self, index: Idx) -> &<RgbaOf<T> as Get<Idx>>::Output

Returns a reference to the value.
Source§

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

Returns a reference to the value.
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§

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

Source§

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

Source§

fn try_get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Result<[&mut <RgbaOf<T> as Get<Idx>>::Output; N], GetDisjointMutError>

Source§

fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut <RgbaOf<T> as Get<Idx>>::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 <RgbaOf<T> as Get<Idx>>::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 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 RgbaOf<T>
where [T; 4]: GetMut<Idx>,

Source§

fn get_mut( &mut self, index: Idx, ) -> Option<&mut <RgbaOf<T> as Get<Idx>>::Output>

Returns a mutable reference to the value.
Source§

unsafe fn get_unchecked_mut( &mut self, index: Idx, ) -> &mut <RgbaOf<T> as Get<Idx>>::Output

Returns a mutable reference to the value.
Source§

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

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 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 RgbaOf<T>
where T: Half + Copy,

Source§

const HALF: RgbaOf<T>

Source§

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

Source§

fn set_half(&mut self) -> &mut 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 RgbaOf<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 RgbaOf<T>
where T: Primitive,

Source§

const TRANSPARENT: RgbaOf<T>

Source§

const BLACK: RgbaOf<T>

#000000 Read more
Source§

const GREY: RgbaOf<T>

#777777 Read more
Source§

const WHITE: RgbaOf<T>

#FFFFFF Read more
Source§

const RED: RgbaOf<T>

#FF0000 Read more
Source§

const GREEN: RgbaOf<T>

#00FF00 Read more
Source§

const BLUE: RgbaOf<T>

#0000FF Read more
Source§

const CYAN: RgbaOf<T>

#00FFFF Read more
Source§

const MAGENTA: RgbaOf<T>

#FF00FF Read more
Source§

const YELLOW: RgbaOf<T>

#FFFF00 Read more
Source§

const SPRING: RgbaOf<T>

#00FF7F
Source§

const AZURE: RgbaOf<T>

#007FFF
Source§

const VIOLET: RgbaOf<T>

#7F00FF
Source§

const ROSE: RgbaOf<T>

#FF007F
Source§

const ORANGE: RgbaOf<T>

#FF7F00
Source§

const LIME: RgbaOf<T>

#7FFF00
Source§

const CANARY: RgbaOf<T>

#FFFF7F
Source§

const PINK: RgbaOf<T>

#FF7FFF
Source§

const GLACE: RgbaOf<T>

#7FFFFF
Source§

type Component = T

Source§

fn to_rgba_of<R>(self) -> RgbaOf<R>

Source§

fn to_hsla_of<R>(self) -> HslaOf<R>
where R: Float + CastRangeFrom<<RgbaOf<T> as IColor>::Component>,

Source§

fn from_rgba_u8(rgba: RgbaOf<u8>) -> RgbaOf<T>

Source§

fn from_rgba_u16(rgba: RgbaOf<u16>) -> RgbaOf<T>

Source§

fn from_rgba_f32(rgba: RgbaOf<f32>) -> RgbaOf<T>

Source§

fn from_rgba_f64(rgba: RgbaOf<f64>) -> RgbaOf<T>

Source§

fn from_rgba_float(rgba: RgbaOf<f32>) -> RgbaOf<T>

Source§

impl<T, Idx> Index<Idx> for RgbaOf<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) -> &<RgbaOf<T> as Index<Idx>>::Output

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

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

Source§

fn index_mut(&mut self, index: Idx) -> &mut <RgbaOf<T> as Index<Idx>>::Output

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

impl<T> Infinity for RgbaOf<T>
where T: Infinity + Copy,

Source§

const INFINITY: RgbaOf<T>

Source§

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

Source§

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

Source§

impl<'a, T> IntoIterator for &'a RgbaOf<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) -> <&'a RgbaOf<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a mut RgbaOf<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) -> <&'a mut RgbaOf<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoIterator for RgbaOf<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) -> <RgbaOf<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> Length for RgbaOf<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

True if the container contains 0 elements. Read more
Source§

fn is_not_empty(&self) -> bool

True if the container contains at least one element. Will always be different than is_empty(). Read more
Source§

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

Source§

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

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

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

Source§

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

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

impl<T> Map for RgbaOf<T>

Source§

type WithType<T2> = RgbaOf<T2>

Source§

fn map<T2, F>(self, f: F) -> <RgbaOf<T> as Map>::WithType<T2>
where F: FnMut(<RgbaOf<T> as MapIntern>::Item) -> T2,

Apply f to each item, returning a container of the mapped values.
Source§

impl<T> MapIntern for RgbaOf<T>

Source§

type Item = T

Source§

fn map_intern<F>(self, f: F) -> RgbaOf<T>
where F: FnMut(<RgbaOf<T> as MapIntern>::Item) -> <RgbaOf<T> as MapIntern>::Item,

Apply f to each item, producing a new container of the same type.
Source§

impl<T> MapInternWith for RgbaOf<T>

Source§

fn map_with_intern<F>(self, other: RgbaOf<T>, f: F) -> RgbaOf<T>
where F: FnMut(<RgbaOf<T> as MapIntern>::Item, <RgbaOf<T> as MapIntern>::Item) -> <RgbaOf<T> as MapIntern>::Item,

Combine self and other elementwise with f.
Source§

impl<T> MapWith for RgbaOf<T>

Source§

fn map_with<R, Item2, F>( self, other: <RgbaOf<T> as Map>::WithType<Item2>, f: F, ) -> <RgbaOf<T> as Map>::WithType<R>
where F: FnMut(<RgbaOf<T> as MapIntern>::Item, Item2) -> R,

Combine self and other elementwise with f, producing a new container of the mapped values.
Source§

impl<T> MaxValue for RgbaOf<T>
where T: MaxValue + Copy,

Source§

const MAX: RgbaOf<T>

Source§

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

Source§

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

Source§

impl<T> MinValue for RgbaOf<T>
where T: MinValue + Copy,

Source§

const MIN: RgbaOf<T>

Source§

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

Source§

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

Source§

impl<T> MinusInfinity for RgbaOf<T>
where T: MinusInfinity + Copy,

Source§

impl<T> MinusOne for RgbaOf<T>
where T: MinusOne + Copy,

Source§

const MINUS_ONE: RgbaOf<T>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> <RgbaOf<T> as Mul<T>>::Output

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Mul>::Output

Performs the * operation. Read more
Source§

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

Source§

fn mul_assign(&mut self, rhs: &RgbaOf<T>)

Performs the *= operation. Read more
Source§

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

Source§

fn mul_assign(&mut self, rhs: RgbaOf<T>)

Performs the *= operation. Read more
Source§

impl<T> NaNValue for RgbaOf<T>
where T: NaNValue + Copy,

Source§

const NAN: RgbaOf<T>

Source§

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

Source§

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

Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

fn neg(self) -> <RgbaOf<T> as Neg>::Output

Performs the unary - operation. Read more
Source§

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

Source§

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

The resulting type after applying the ! operator.
Source§

fn not(self) -> <RgbaOf<T> as Not>::Output

Performs the unary ! operation. Read more
Source§

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

Source§

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

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

impl<T> One for RgbaOf<T>
where T: One + Copy,

Source§

const ONE: RgbaOf<T>

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 RgbaOf<T>
where T: Ord,

Source§

fn cmp(&self, rhs: &RgbaOf<T>) -> 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 RgbaOf<T>
where T: PartialEq,

Source§

fn eq(&self, rhs: &RgbaOf<T>) -> 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 RgbaOf<T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, rhs: &RgbaOf<T>) -> 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 RgbaOf<T>
where T: Pointer,

Source§

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

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

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

Source§

fn product<I>(iter: I) -> RgbaOf<T>
where I: Iterator<Item = RgbaOf<T>>,

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

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

Source§

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

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> <RgbaOf<T> as Rem<T>>::Output

Performs the % operation. Read more
Source§

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

Source§

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

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Rem>::Output

Performs the % operation. Read more
Source§

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

Source§

fn rem_assign(&mut self, rhs: &RgbaOf<T>)

Performs the %= operation. Read more
Source§

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

Source§

fn rem_assign(&mut self, rhs: RgbaOf<T>)

Performs the %= operation. Read more
Source§

impl<T> Serialize for RgbaOf<T>
where T: Serialize,

Available on crate feature serde only.
Source§

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<T> Shl<T> for RgbaOf<T>
where T: Shl + Copy,

Source§

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

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

fn shl(self, rhs: T) -> <RgbaOf<T> as Shl<T>>::Output

Performs the << operation. Read more
Source§

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

Source§

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

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

fn shl(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Shl>::Output

Performs the << operation. Read more
Source§

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

Source§

fn shl_assign(&mut self, rhs: &RgbaOf<T>)

Performs the <<= operation. Read more
Source§

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

Source§

fn shl_assign(&mut self, rhs: RgbaOf<T>)

Performs the <<= operation. Read more
Source§

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

Source§

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

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

fn shr(self, rhs: T) -> <RgbaOf<T> as Shr<T>>::Output

Performs the >> operation. Read more
Source§

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

Source§

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

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

fn shr(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Shr>::Output

Performs the >> operation. Read more
Source§

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

Source§

fn shr_assign(&mut self, rhs: &RgbaOf<T>)

Performs the >>= operation. Read more
Source§

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

Source§

fn shr_assign(&mut self, rhs: RgbaOf<T>)

Performs the >>= operation. Read more
Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> <RgbaOf<T> as Sub<T>>::Output

Performs the - operation. Read more
Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: RgbaOf<T>) -> <RgbaOf<T> as Sub>::Output

Performs the - operation. Read more
Source§

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

Source§

fn sub_assign(&mut self, rhs: &RgbaOf<T>)

Performs the -= operation. Read more
Source§

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

Source§

fn sub_assign(&mut self, rhs: RgbaOf<T>)

Performs the -= operation. Read more
Source§

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

Source§

fn sum<I>(iter: I) -> RgbaOf<T>
where I: Iterator<Item = RgbaOf<T>>,

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

impl<P> ToColor<P> for RgbaOf<P>
where P: Primitive,

Source§

type ToRgba<R: Primitive> = RgbaOf<R>

Source§

type ToHsla<R: Float> = HslaOf<R>

Source§

fn to_rgba_of<R>(self) -> <RgbaOf<P> as ToColor<P>>::ToRgba<R>
where R: Primitive + CastRangeFrom<P>,

Source§

fn to_hsla_of<R>(self) -> <RgbaOf<P> as ToColor<P>>::ToHsla<R>
where R: Float + CastRangeFrom<P>,

Source§

fn to_hsla(self) -> Self::ToHsla<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_hsla_f32(self) -> Self::ToHsla<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_hsla_f64(self) -> Self::ToHsla<f64>
where f64: CastRangeFrom<P>,

Source§

fn to_rgba(self) -> Self::ToRgba<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_rgba_f32(self) -> Self::ToRgba<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_rgba_f64(self) -> Self::ToRgba<f64>
where f64: CastRangeFrom<P>,

Source§

fn to_rgba_u8(self) -> Self::ToRgba<u8>
where u8: CastRangeFrom<P>,

Source§

fn to_rgba_u16(self) -> Self::ToRgba<u16>
where u16: CastRangeFrom<P>,

Source§

fn to_color(self) -> Self::ToRgba<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_color_float(self) -> Self::ToRgba<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_color_f32(self) -> Self::ToRgba<f32>
where f32: CastRangeFrom<P>,

Source§

fn to_color_f64(self) -> Self::ToRgba<f64>
where f64: CastRangeFrom<P>,

Source§

fn to_color_u8(self) -> Self::ToRgba<u8>
where u8: CastRangeFrom<P>,

Source§

fn to_color_u16(self) -> Self::ToRgba<u16>
where u16: CastRangeFrom<P>,

Source§

impl<T, Idx> TryGet<Idx> for RgbaOf<T>
where [T; 4]: TryGet<Idx>,

Source§

type Error = <[T; 4] as TryGet<Idx>>::Error

Source§

fn try_get( &self, index: Idx, ) -> Result<&<RgbaOf<T> as Get<Idx>>::Output, <RgbaOf<T> as TryGet<Idx>>::Error>

Returns a reference to the value.
Source§

impl<T, Idx> TryGetMut<Idx> for RgbaOf<T>
where [T; 4]: TryGetMut<Idx>,

Source§

fn try_get_mut( &mut self, index: Idx, ) -> Result<&mut <RgbaOf<T> as Get<Idx>>::Output, <RgbaOf<T> as TryGet<Idx>>::Error>

Returns a mutable reference to the value.
Source§

fn try_replace( &mut self, index: Idx, value: Self::Output, ) -> Result<Self::Output, Self::Error>
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<(), Self::Error>
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

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

Source§

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

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

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

Source§

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

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

impl<T, Policy> WithDefault<T, Policy> for RgbaOf<T>
where RgbaOf<T>: CfgSerialize + for<'de> CfgDeserialize<'de>, T: CfgSerialize + for<'de> CfgDeserialize<'de>, Policy: Constant<T>,

Source§

impl<T> Zero for RgbaOf<T>
where T: Zero + Copy,

Source§

const ZERO: RgbaOf<T>

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> BitAllUsed for RgbaOf<T>
where T: BitAllUsed,

Source§

impl<T> BitZero for RgbaOf<T>
where T: BitZero,

Source§

impl<T> Collection for RgbaOf<T>

Source§

impl<T> CollectionBijective for RgbaOf<T>

Source§

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

Source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<T> UnsafeUnpin for RgbaOf<T>
where T: UnsafeUnpin,

§

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

Blanket Implementations§

Source§

impl<S> Abs for S
where S: Map, <S as MapIntern>::Item: Abs,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as Abs>::Output>

Source§

fn abs(self) -> <S as Abs>::Output

Absolute value in a component way. Read more
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> ArrayMax<T, N> for S
where S: Array<T, N>,

Source§

fn max_element_by<F>(&self, compare: F) -> &T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn max_element_by_key<F, K>(&self, f: F) -> &T
where F: FnMut(&T) -> K, K: Ord,

Source§

fn max_element_mut_by<F>(&mut self, compare: F) -> &mut T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn max_element_mut_by_key<F, K>(&mut self, f: F) -> &mut T
where F: FnMut(&T) -> K, K: Ord,

Source§

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

Source§

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

Source§

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

Source§

impl<S, T, const N: usize> ArrayMin<T, N> for S
where S: Array<T, N>,

Source§

fn min_element_by<F>(&self, compare: F) -> &T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn min_element_by_key<F, K>(&self, f: F) -> &T
where F: FnMut(&T) -> K, K: Ord,

Source§

fn min_element_mut_by<F>(&mut self, compare: F) -> &mut T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn min_element_mut_by_key<F, K>(&mut self, f: F) -> &mut T
where F: FnMut(&T) -> K, K: Ord,

Source§

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

Source§

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

Source§

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

Source§

impl<S, T, const N: usize> ArrayToColor<T, N> for S
where S: Array<T, N>,

Source§

fn to_rgba(self) -> RgbaOf<T>
where T: Default,

Source§

fn to_hlsa(self) -> HslaOf<T>
where T: Default,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T> BitZeroed for T
where T: BitZero,

Source§

fn zeroed() -> Self

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<C1, C2> CastFrom<C2> for C1
where C1: Map, C2: Map<WithType<<C1 as MapIntern>::Item> = C1>, <C1 as MapIntern>::Item: CastFrom<<C2 as MapIntern>::Item>,

Source§

fn cast_from(value: C2) -> C1

Source§

impl<S, T> CastInto<T> for S
where T: CastFrom<S>,

Source§

fn cast_into(self) -> T

Source§

impl<C1, C2> CastRangeFrom<C2> for C1
where C1: Map, C2: Map<WithType<<C1 as MapIntern>::Item> = C1>, <C1 as MapIntern>::Item: CastRangeFrom<<C2 as MapIntern>::Item>,

Source§

fn cast_range_from(value: C2) -> C1

Source§

impl<S, T> CastRangeInto<T> for S
where T: CastRangeFrom<S>,

Source§

impl<T> Clamp for T
where T: Min + Max,

Source§

fn clamp_elementwise(self, min_val: T, max_val: T) -> T

Clamp function in a component way Read more
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<I, T> CollectTo<T> for I
where I: IntoIterator<Item = T>,

Source§

fn to_vec(self) -> Vec<T>

Source§

fn to_linkedlist(self) -> LinkedList<T>

Source§

fn to_vecdeque(self) -> VecDeque<T>

Source§

fn to_hashset(self) -> HashSet<T>
where T: Eq + Hash,

Source§

fn to_btreeset(self) -> BTreeSet<T>
where T: Ord,

Source§

impl<I, K, V, S> CollectToGenMap<K, V, S> for I
where I: IntoIterator<Item = (K, V)>, K: Clone,

Source§

fn to_genmap(self) -> GenMapOf<K, V, u32, S>
where GenMapOf<K, V, u32, S>: WithCapacity + Reserve, <GenMapOf<K, V, u32, S> as WithCapacity>::Param: Default, S: Default + Insert<K, GenIDOf<V>>,

Source§

impl<I, K, S> CollectToGenSet<K, S> for I
where I: IntoIterator<Item = K>, K: Clone,

Source§

fn to_genset(self) -> GenSetOf<K, u32, S>
where GenSetOf<K, u32, S>: WithCapacity + Reserve, <GenSetOf<K, u32, S> as WithCapacity>::Param: Default, S: Default + Insert<K, GenIDOf<K>> + for<'a> Remove<&'a K, Output = GenIDOf<K>>,

Source§

impl<I, T> CollectToGenVec<T> for I
where I: IntoIterator<Item = T>,

Source§

fn to_genvec(self) -> GenSeq<T>

Source§

impl<I, T1, T2> CollectToMap<T1, T2> for I
where I: IntoIterator<Item = (T1, T2)>,

Source§

fn to_hashmap(self) -> HashMap<T1, T2>
where T1: Eq + Hash,

Source§

fn to_btreemap(self) -> BTreeMap<T1, T2>
where T1: Ord,

Source§

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

Source§

fn decrement(&mut self)

The decrement x-- operator
Source§

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

The increment x-- operator
Source§

fn can_decrement(&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> DefaultExtension for T
where T: Default + PartialEq,

Source§

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

Source§

fn ___() -> T

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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

Source§

fn from_fn<F>(f: F) -> Self
where F: FnMut(usize) -> T,

Source§

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

Source§

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

Source§

fn from_json_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_json_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_json(json: &str) -> Result<Self, EncodeError>

Source§

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

Source§

fn from_ron_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_ron_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_ron(ron: &str) -> Result<Self, EncodeError>

Source§

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

Source§

fn from_tmp_bin_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_tmp_bin_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

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

Source§

fn from_xml_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_xml_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_xml(xml: &str) -> Result<Self, EncodeError>

Source§

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

Source§

fn retrieve(&self) -> T

Source§

impl<T> HasMut<T> for T

Source§

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

Source§

impl<T> HasRef<T> for T

Source§

fn retrive_ref(&self) -> &T

Source§

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

Source§

fn increment(&mut self)

The increment x++ operator
Source§

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

The increment x++ operator
Source§

fn can_increment(&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<'a, Item, T> IterExtension<'a, Item> for T
where &'a T: IntoIterator<Item = Item> + 'a,

Source§

fn iter(&'a self) -> <&'a Self as IntoIterator>::IntoIter

Source§

impl<Item, T> IterPredicate<Item> for T
where T: IntoIterator<Item = Item>,

Source§

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

Source§

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

Source§

fn any_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, O: IntoIterator<Item = Item>,

Source§

fn all_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, O: IntoIterator<Item = Item>,

Source§

impl<S> Max for S
where S: MapInternWith, <S as MapIntern>::Item: Max,

Source§

fn max_elementwise(self, other: S) -> S

Max function in a component way Read more
Source§

impl<S> Min for S
where S: MapInternWith, <S as MapIntern>::Item: Min,

Source§

fn min_elementwise(self, other: S) -> S

Min function in a component way Read more
Source§

impl<T, Z> MinusOneIter for T
where &'a T: for<'a> IntoIterator<Item = &'a Z>, Z: MinusOne + PartialEq,

Source§

impl<S, F> Mix<F> for S
where S: MapInternWith, <S as MapIntern>::Item: Mix<F>, F: Float,

Source§

fn mix_unchecked(self, dest: S, coef: F) -> S

Mix function in a component way Read more
Source§

fn mix(self, dest: Self, coef: C) -> Self

Mix function in a component way Read more
Source§

impl<T, Z> OneIter for T
where &'a T: for<'a> IntoIterator<Item = &'a Z>, Z: One + PartialEq,

Source§

fn all_one(&self) -> bool

Source§

fn any_one(&self) -> bool

Source§

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

Source§

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

Using PartialOrd operator, not component wise
Source§

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

Using PartialOrd operator, not component wise
Source§

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

Using PartialOrd operator, not component wise
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) -> Vector<Self, 1>

Source§

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

Source§

fn splat2(self) -> Vector<Self, 2>

Source§

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

Source§

fn splat3(self) -> Vector<Self, 3>

Source§

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

Source§

fn splat4(self) -> Vector<Self, 4>

Source§

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

Source§

fn take_half(self) -> T

Half the current value
Source§

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

Source§

fn three() -> T

There will be a constant THREE later when const trait will be stable
Source§

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

Source§

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

Source§

impl<T> ToAngleComposite for T
where T: Map, <T as MapIntern>::Item: ToAngleComposite,

Source§

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

Source§

impl<C, T> ToArray3<T> for C
where C: Into<[T; 3]>,

Source§

impl<C, T> ToArray4<T> for C
where C: Into<[T; 4]>,

Source§

impl<S> ToBool for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToBool>::Output>>, <S as MapIntern>::Item: ToBool,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToBool>::Output>

Source§

fn to_bool(self) -> <S as ToBool>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_bool_range(self) -> <S as ToBool>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

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

Source§

impl<S> ToF32 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToF32>::Output>>, <S as MapIntern>::Item: ToF32,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToF32>::Output>

Source§

fn to_f32(self) -> <S as ToF32>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_f32_range(self) -> <S as ToF32>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToF64 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToF64>::Output>>, <S as MapIntern>::Item: ToF64,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToF64>::Output>

Source§

fn to_f64(self) -> <S as ToF64>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_f64_range(self) -> <S as ToF64>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToFloat for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToFloat>::Output>>, <S as MapIntern>::Item: ToFloat,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToFloat>::Output>

Source§

fn to_float(self) -> <S as ToFloat>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_float_range(self) -> <S as ToFloat>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI16 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI16>::Output>>, <S as MapIntern>::Item: ToI16,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI16>::Output>

Source§

fn to_i16(self) -> <S as ToI16>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i16_range(self) -> <S as ToI16>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI32 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI32>::Output>>, <S as MapIntern>::Item: ToI32,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI32>::Output>

Source§

fn to_i32(self) -> <S as ToI32>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i32_range(self) -> <S as ToI32>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI64 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI64>::Output>>, <S as MapIntern>::Item: ToI64,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI64>::Output>

Source§

fn to_i64(self) -> <S as ToI64>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i64_range(self) -> <S as ToI64>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI8 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI8>::Output>>, <S as MapIntern>::Item: ToI8,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI8>::Output>

Source§

fn to_i8(self) -> <S as ToI8>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i8_range(self) -> <S as ToI8>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToISize for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToISize>::Output>>, <S as MapIntern>::Item: ToISize,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToISize>::Output>

Source§

fn to_isize(self) -> <S as ToISize>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_isize_range(self) -> <S as ToISize>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToInt for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToInt>::Output>>, <S as MapIntern>::Item: ToInt,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToInt>::Output>

Source§

fn to_int(self) -> <S as ToInt>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_int_range(self) -> <S as ToInt>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<T> ToJson for T
where T: Serialize,

Source§

fn to_json(&self) -> Result<String, EncodeError>

Source§

fn to_json_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

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> ToRon for T
where T: Serialize,

Source§

fn to_ron(&self) -> Result<String, EncodeError>

Source§

fn to_ron_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

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> ToTimeComposite for T
where T: Map, <T as MapIntern>::Item: ToTimeComposite,

Source§

type Output = <T as Map>::WithType<<<T as MapIntern>::Item as ToTimeComposite>::Output>

Source§

fn millis(self) -> <T as ToTimeComposite>::Output

Creates a new Time from the specified number of whole milliseconds.
Source§

fn secs(self) -> <T as ToTimeComposite>::Output

Creates a new Time from the specified number of whole seconds.
Source§

fn mins(self) -> <T as ToTimeComposite>::Output

Creates a new Time from the specified number of whole minutes.
Source§

fn hours(self) -> <T as ToTimeComposite>::Output

Creates a new Time from the specified number of whole hours.
Source§

fn days(self) -> <T as ToTimeComposite>::Output

Creates a new Time from the specified number of whole days.
Source§

impl<T> ToTmpBin for T
where T: Serialize,

Source§

fn to_tmp_bin(&self) -> Result<Vec<u8>, EncodeError>

Intended for short-term storage of data in a binary format, such as during data transfer. Read more
Source§

fn to_tmp_bin_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Intended for short-term storage of data in a binary format, such as during data transfer. Read more
Source§

impl<S> ToU16 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU16>::Output>>, <S as MapIntern>::Item: ToU16,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU16>::Output>

Source§

fn to_u16(self) -> <S as ToU16>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u16_range(self) -> <S as ToU16>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToU32 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU32>::Output>>, <S as MapIntern>::Item: ToU32,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU32>::Output>

Source§

fn to_u32(self) -> <S as ToU32>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u32_range(self) -> <S as ToU32>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToU64 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU64>::Output>>, <S as MapIntern>::Item: ToU64,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU64>::Output>

Source§

fn to_u64(self) -> <S as ToU64>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u64_range(self) -> <S as ToU64>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToU8 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU8>::Output>>, <S as MapIntern>::Item: ToU8,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU8>::Output>

Source§

fn to_u8(self) -> <S as ToU8>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u8_range(self) -> <S as ToU8>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToUInt for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToUInt>::Output>>, <S as MapIntern>::Item: ToUInt,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToUInt>::Output>

Source§

fn to_uint(self) -> <S as ToUInt>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_uint_range(self) -> <S as ToUInt>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToUSize for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToUSize>::Output>>, <S as MapIntern>::Item: ToUSize,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToUSize>::Output>

Source§

fn to_usize(self) -> <S as ToUSize>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_usize_range(self) -> <S as ToUSize>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<T> ToXml for T
where T: Serialize,

Source§

fn to_xml(&self) -> Result<String, EncodeError>

Source§

fn to_xml_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Source§

impl<T, S> TryAsRef<T> for S
where S: AsRef<T>,

Source§

type Error = Never

Source§

fn try_as_ref(&self) -> Result<&T, <S as TryAsRef<T>>::Error>

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: NumericIdentity,

Source§

fn two() -> T

There will be a constant TWO later when const trait will be stable
Source§

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

Source§

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

Source§

impl<T, Z> ZeroIter for T
where &'a T: for<'a> IntoIterator<Item = &'a Z>, Z: Zero + PartialEq,

Source§

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

Source§

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

Source§

impl<T> ArithmeticSigned for T
where T: Arithmetic + Neg<Output = T>,

Source§

impl<T> Async for T
where T: Send + Sync + 'static,

Source§

impl<'de, T> CfgDeserialize<'de> for T
where T: Deserialize<'de> + ?Sized,

Source§

impl<T> CfgSerialize for T
where T: Serialize + ?Sized,

Source§

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

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> Number for T

Source§

impl<T> NumberSigned for T

Source§

impl<T> Numeric for T
where T: Arithmetic + PartialEq + Debug + Min + Max + Clamp + Mix + Abs<Output = T>,

Source§

impl<T> NumericIdentity for T
where T: Numeric + One,

Source§

impl<T> NumericSigned for T

Source§

impl<T> NumericSignedIdentity for T
where T: NumericSigned + One,