Skip to main content

ColorRgbaOf

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 = 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) -> ColorRgbaOf<T>

Source

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

Source

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

Source

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

Source

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

Source

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

Alpha is at max

Source

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

Red

Source

pub fn set_r(&mut self, r: T) -> &mut ColorRgbaOf<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) -> ColorRgbaOf<T>
where T: Copy,

Green

Source

pub fn set_g(&mut self, g: T) -> &mut ColorRgbaOf<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) -> ColorRgbaOf<T>
where T: Copy,

Blue

Source

pub fn set_b(&mut self, b: T) -> &mut ColorRgbaOf<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) -> ColorRgbaOf<T>
where T: Copy,

Alpha

Source

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

Alpha

Source

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

Alpha

Trait Implementations§

Source§

impl<T> Abs for ColorRgbaOf<T>
where T: Abs,

Source§

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

Source§

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

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

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<(), Error>

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

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

Source§

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

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

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

Source§

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

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the &= operation. Read more
Source§

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

Source§

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

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

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

Source§

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

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the |= operation. Read more
Source§

impl<T, Dest> CastIntoComposite<Dest> for ColorRgbaOf<T>
where T: CastIntoComposite<Dest>,

Source§

type Output = ColorRgbaOf<<T as CastIntoComposite<Dest>>::Output>

Source§

fn cast_into_composite( self, ) -> <ColorRgbaOf<T> as CastIntoComposite<Dest>>::Output

Might lose some precision. Same semantics as the as keyword: 4f32 as u64, but can be used in a generic way.
Source§

impl<T, Dest> CastRangeIntoComposite<Dest> for ColorRgbaOf<T>
where T: CastRangeIntoComposite<Dest>,

Source§

type Output = ColorRgbaOf<<T as CastRangeIntoComposite<Dest>>::Output>

Source§

fn cast_range_into_composite( self, ) -> <ColorRgbaOf<T> as CastRangeIntoComposite<Dest>>::Output

Might lose some precision.
Source§

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

Source§

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

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

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

Source§

impl<T> Debug for ColorRgbaOf<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 ColorRgbaOf<T>
where T: Primitive,

Source§

fn default() -> ColorRgbaOf<T>

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

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

Source§

fn deserialize<D>( deserializer: D, ) -> Result<ColorRgbaOf<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 ColorRgbaOf<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 for ColorRgbaOf<T>
where T: Div,

Source§

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

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

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

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the /= operation. Read more
Source§

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

Source§

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

Source§

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

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)) -> ColorRgbaOf<T>

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

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<&<ColorRgbaOf<T> as Get<Idx>>::Output, ()>

Source§

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

Source§

unsafe fn get_unchecked( &self, index: Idx, ) -> &<ColorRgbaOf<T> as Get<Idx>>::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 <ColorRgbaOf<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 <ColorRgbaOf<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<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 <ColorRgbaOf<T> as Get<Idx>>::Output, ()>

Source§

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

Source§

unsafe fn get_unchecked_mut( &mut self, index: Idx, ) -> &mut <ColorRgbaOf<T> as Get<Idx>>::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 + Copy,

Source§

const HALF: ColorRgbaOf<T>

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<T> for ColorRgbaOf<T>
where T: Primitive,

Source§

const TRANSPARENT: ColorRgbaOf<T>

Source§

const BLACK: ColorRgbaOf<T>

#000000 Read more
Source§

const GREY: ColorRgbaOf<T>

#777777 Read more
Source§

const WHITE: ColorRgbaOf<T>

#FFFFFF Read more
Source§

const RED: ColorRgbaOf<T>

#FF0000 Read more
Source§

const GREEN: ColorRgbaOf<T>

#00FF00 Read more
Source§

const BLUE: ColorRgbaOf<T>

#0000FF Read more
Source§

const CYAN: ColorRgbaOf<T>

#00FFFF Read more
Source§

const MAGENTA: ColorRgbaOf<T>

#FF00FF Read more
Source§

const YELLOW: ColorRgbaOf<T>

#FFFF00 Read more
Source§

const SPRING: ColorRgbaOf<T>

#00FF7F
Source§

const AZURE: ColorRgbaOf<T>

#007FFF
Source§

const VIOLET: ColorRgbaOf<T>

#7F00FF
Source§

const ROSE: ColorRgbaOf<T>

#FF007F
Source§

const ORANGE: ColorRgbaOf<T>

#FF7F00
Source§

const LIME: ColorRgbaOf<T>

#7FFF00
Source§

const CANARY: ColorRgbaOf<T>

#FFFF7F
Source§

const PINK: ColorRgbaOf<T>

#FF7FFF
Source§

const GLACE: ColorRgbaOf<T>

#7FFFFF
Source§

fn to_rgba_of<T2>(self) -> ColorRgbaOf<T2>
where T2: Primitive + CastRangeFrom<T>,

Source§

fn to_hsla_of<T2>(self) -> ColorHslaOf<T2>
where T2: Float + CastRangeFrom<T>,

Source§

fn rgba_from_hex(hex: u32) -> ColorRgbaOf<T>
where T: CastRangeFrom<u8>,

Source§

fn rgba_from_array(rgba: [u8; 4]) -> ColorRgbaOf<T>
where T: CastRangeFrom<u8>,

Source§

fn rgba_from_u8(r: u8, g: u8, b: u8, a: u8) -> ColorRgbaOf<T>
where T: CastRangeFrom<u8>,

Source§

fn to_rgba_u8_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) -> &<ColorRgbaOf<T> as Index<Idx>>::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 <ColorRgbaOf<T> as Index<Idx>>::Output

Performs the mutable indexing (container[index]) operation. 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) -> <ColorRgbaOf<T> as IntoIterator>::IntoIter

Creates an iterator from a value. 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) -> <&'a ColorRgbaOf<T> as IntoIterator>::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) -> <&'a mut ColorRgbaOf<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IoLoad for ColorRgbaOf<T>
where T: IoLoad,

Available on crate feature hexga_io only.
Source§

fn load_own_extensions() -> impl Iterator<Item = &'static str>

Dedicated file extension to load the value. ex png, jpeg for image Read more
Source§

fn load_from_bytes_with_own_extension( data: &[u8], path: &str, extension: &str, ) -> Result<Self, IoError>

Source§

fn load_from_bytes_with_own_extension_pathless( data: &[u8], extension: &str, ) -> Result<Self, IoErrorKind>

Source§

const CAN_BE_LOADED_FROM_TEXT: bool = false

Source§

fn load_from_str_with_own_extension( data: &str, path: &str, extension: &str, ) -> Result<Self, IoError>

Source§

fn load_from_str_with_own_extension_pathless( data: &str, extension: &str, ) -> Result<Self, IoErrorKind>

Source§

fn can_open_own_extension(extension: &str) -> bool

Don’t include the markup language extension like json or ron
Source§

fn load_extensions() -> impl Iterator<Item = &'static str>

Also include the markup language extension like json or ron
Source§

fn can_open_extension(extension: &str) -> bool

Also include the markup language extension like json or ron
Source§

fn load_from<Fs>(path: &str, fs: &mut Fs) -> Result<Self, IoError>
where Fs: IoFsRead,

Source§

fn load_from_with_extension<Fs>( path: &str, extension: &str, fs: &mut Fs, ) -> Result<Self, IoError>
where Fs: IoFsRead,

Source§

fn load_from_reader<R>(r: R, path: &str) -> Result<Self, IoError>
where R: Read,

Support bytes and str
Source§

fn load_from_bytes(data: &[u8], path: &str) -> Result<Self, IoError>

Support bytes and str
Source§

fn load_from_bytes_with_extension( data: &[u8], path: &str, extension: &str, ) -> Result<Self, IoError>

Support bytes and str
Source§

impl<T> IoSave for ColorRgbaOf<T>
where T: IoSave,

Available on crate feature hexga_io only.
Source§

fn save_own_extensions() -> impl Iterator<Item = &'static str>

Dedicated file extension to save the value. ex png, jpeg for image Read more
Source§

fn save_to_with_own_extension<W, Fs>( &self, path: &str, extension: &str, w: W, fs: &mut Fs, ) -> Result<(), IoError>
where W: Write, Fs: IoFsWrite,

Source§

fn save_to_with_own_extension_pathless<W, Fs>( &self, extension: &str, w: W, fs: &mut Fs, ) -> Result<(), IoErrorKind>
where W: Write, Fs: IoFsWrite,

Source§

fn save_default_extension() -> Option<&'static str>

When saving, if the extension is missing, the file will use this extension by default
Source§

fn can_save_own_extension(extension: &str) -> bool

Don’t include the markup language extension like json or ron
Source§

fn save_extensions() -> impl Iterator<Item = &'static str>

Also include the markup language extension like json or ron
Source§

fn can_save_extension(extension: &str) -> bool

Also include the markup language extension like json or ron
Source§

fn save_to<Fs>(&self, path: &str, fs: &mut Fs) -> Result<(), IoError>
where Fs: IoFsWrite,

Source§

fn save_to_with_extension<Fs>( &self, path: &str, extension: &str, fs: &mut Fs, ) -> Result<(), IoError>
where Fs: IoFsWrite,

Source§

fn save_with_reader<W, Fs>( &self, path: &str, w: W, fs: &mut Fs, ) -> Result<(), IoError>
where W: Write, Fs: IoFsWrite,

Source§

fn save_with_reader_and_extension<W, Fs>( &self, path: &str, extension: &str, w: W, fs: &mut Fs, ) -> Result<(), IoError>
where W: Write, Fs: IoFsWrite,

Source§

impl<T> LowerExp for ColorRgbaOf<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 ColorRgbaOf<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> MaxValue for ColorRgbaOf<T>
where T: MaxValue + Copy,

Source§

const MAX: ColorRgbaOf<T>

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 + Copy,

Source§

const MIN: ColorRgbaOf<T>

Source§

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

Source§

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

Source§

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

Source§

const MINUS_ONE: ColorRgbaOf<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 + Copy,

Source§

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

Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the *= operation. Read more
Source§

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

Source§

const NAN: ColorRgbaOf<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 ColorRgbaOf<T>
where T: Neg,

Source§

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

The resulting type after applying the - operator.
Source§

fn neg(self) -> <ColorRgbaOf<T> as Neg>::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) -> <ColorRgbaOf<T> as Not>::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<(), Error>

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

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

Source§

const ONE: ColorRgbaOf<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 ColorRgbaOf<T>
where T: Ord,

Source§

fn cmp(&self, rhs: &ColorRgbaOf<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

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

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

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

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

Source§

fn eq(&self, rhs: &ColorRgbaOf<T>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

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

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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<(), Error>

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

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

Source§

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

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

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

Source§

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

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

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

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the %= operation. Read more
Source§

impl<T> Serialize for ColorRgbaOf<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 for ColorRgbaOf<T>
where T: Shl,

Source§

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

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

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

Performs the << operation. Read more
Source§

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

Source§

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

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

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

Performs the << operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the <<= operation. Read more
Source§

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

Source§

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

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the >>= operation. Read more
Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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

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: &ColorRgbaOf<T>)

Performs the -= operation. Read more
Source§

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

Source§

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

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

impl<T> ToColorComposite for ColorRgbaOf<T>
where T: Primitive,

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) -> <ColorRgbaOf<T> as ToSigned>::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) -> <ColorRgbaOf<T> as ToUnsigned>::Output

Source§

impl<T> UpperExp for ColorRgbaOf<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 ColorRgbaOf<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> Zero for ColorRgbaOf<T>
where T: Zero + Copy,

Source§

const ZERO: ColorRgbaOf<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,

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> UnsafeUnpin for ColorRgbaOf<T>
where T: UnsafeUnpin,

§

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<T> ArithmeticNegative for T
where T: Neg<Output = T>,

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 into_array1(self) -> [T; 1]
where T: Default,

Fill non existing component with Default
Source§

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

Fill non existing component with the Cloned given value
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with the Cloned given value
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with the Cloned given value
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with the Cloned given value
Source§

fn to_point1(self) -> Vector<i32, 1>
where i32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point2(self) -> Vector<i32, 2>
where i32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point3(self) -> Vector<i32, 3>
where i32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point4(self) -> Vector<i32, 4>
where i32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_point1_filled(self, fill: i32) -> Vector<i32, 1>
where i32: From<T>,

Fill non existing component with the given value
Source§

fn to_point2_filled(self, fill: i32) -> Vector<i32, 2>
where i32: From<T>,

Fill non existing component with the given value
Source§

fn to_point3_filled(self, fill: i32) -> Vector<i32, 3>
where i32: From<T>,

Fill non existing component with the given value
Source§

fn to_point4_filled(self, fill: i32) -> Vector<i32, 4>
where i32: From<T>,

Fill non existing component with the given value
Source§

fn to_vec1(self) -> Vector<f32, 1>
where f32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec2(self) -> Vector<f32, 2>
where f32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec3(self) -> Vector<f32, 3>
where f32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec4(self) -> Vector<f32, 4>
where f32: From<T>, T: Default,

Fill non existing component with Default
Source§

fn to_vec1_filled(self, fill: f32) -> Vector<f32, 1>
where f32: From<T>,

Fill non existing component with the given value
Source§

fn to_vec2_filled(self, fill: f32) -> Vector<f32, 2>
where f32: From<T>,

Fill non existing component with the given value
Source§

fn to_vec3_filled(self, fill: f32) -> Vector<f32, 3>
where f32: From<T>,

Fill non existing component with the given value
Source§

fn to_vec4_filled(self, fill: f32) -> Vector<f32, 4>
where f32: From<T>,

Fill non existing component with the given value
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with Default
Source§

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

Fill non existing component with the given value
Source§

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

Fill non existing component with the given value
Source§

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

Fill non existing component with the given value
Source§

fn to_vector4_filled(self, fill: T) -> Vector<T, 4>
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, T2> CastInto<T> for T2
where T2: CastIntoComposite<T, Output = T>,

Source§

fn cast_into(self) -> Self::Output

Source§

impl<Src, Dest> CastRangeFrom<Dest> for Src
where Dest: CastRangeInto<Src>,

Source§

fn cast_range_from(value: Dest) -> Src

Source§

impl<T, T2> CastRangeInto<T> for T2
where T2: CastRangeIntoComposite<T, Output = T>,

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> CollectExtension<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, T1, T2> CollectMapExtension<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<I, T1> CollectToGenVecExtension<T1> for I
where I: IntoIterator<Item = T1>,

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> 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ExtensionToArray3<T> for C
where C: Into<[T; 3]>,

Source§

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

Source§

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

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: f32) -> Self

Restricted between [0..1]
Source§

impl<T> LoadToDisk for T
where T: IoLoad + ?Sized,

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> NumberArithmetic for T
where T: MulAssign + Product + Div<Output = T> + UnitArithmetic + DivAssign + Rem<Output = T> + Mul<Output = T> + RemAssign,

Source§

impl<T> NumberNegative for T

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> SaveToDisk for T
where T: IoSave + ?Sized,

Source§

fn save_to_disk(&self, path: &str) -> Result<(), IoError>

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

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> ToColor for T
where T: ToColorComposite<RgbaF32 = ColorRgbaOf<f32>, RgbaF64 = ColorRgbaOf<f64>, HslaF32 = ColorHslaOf<f32>, HslaF64 = ColorHslaOf<f64>, RgbaU8 = ColorRgbaOf<u8>, RgbaU16 = ColorRgbaOf<u16>, RgbaBool = ColorRgbaOf<bool>> + Copy,

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<S, T> ToGpuColor<T> for S
where S: IColor<T>, T: Primitive,

Source§

impl<T> ToGpuFloat for T
where T: ToF32,

Source§

impl<T> ToGpuInt for T
where T: ToI32,

Source§

type Output = <T as ToI32>::Output

Source§

fn to_gpu_int(self) -> <T as ToGpuInt>::Output

Source§

impl<T> ToGpuUint for T
where T: ToU32,

Source§

impl<T> ToI8 for T

Source§

impl<T> ToI16 for T

Source§

impl<T> ToI32 for T

Source§

impl<T> ToI64 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> ToU8 for T

Source§

impl<T> ToU16 for T

Source§

impl<T> ToU32 for T

Source§

impl<T> ToU64 for T

Source§

impl<T> ToUInt for T

Source§

impl<T> ToUSize for T

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

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> UnitArithmetic for T
where T: Add<Output = T> + AddAssign + Sum + Sub<Output = T> + Copy + SubAssign + Zero,