#[repr(C)]pub struct Rgb<T> {
pub r: T,
pub g: T,
pub b: T,
}
Expand description
Fields§
§r: T
Red Component
g: T
Green Component
b: T
Blue Component
Implementations§
Trait Implementations§
source§impl<T> AddAssign<T> for Rgb<T>
impl<T> AddAssign<T> for Rgb<T>
px + 1
source§fn add_assign(&mut self, r: T)
fn add_assign(&mut self, r: T)
Performs the
+=
operation. Read moresource§impl<T> AddAssign for Rgb<T>
impl<T> AddAssign for Rgb<T>
px + px
source§fn add_assign(&mut self, other: RGB<T>)
fn add_assign(&mut self, other: RGB<T>)
Performs the
+=
operation. Read moresource§impl<T> AsPixels<Rgb<T>> for [T]
impl<T> AsPixels<Rgb<T>> for [T]
source§fn as_pixels_mut(&mut self) -> &mut [RGB<T>]
fn as_pixels_mut(&mut self) -> &mut [RGB<T>]
Use
::bytemuck::cast_slice_mut()
instead. Read moresource§impl<T: Copy, B> ColorComponentMap<Rgb<B>, T, B> for Rgb<T>
impl<T: Copy, B> ColorComponentMap<Rgb<B>, T, B> for Rgb<T>
source§impl<T> ComponentSlice<T> for Rgb<T>
impl<T> ComponentSlice<T> for Rgb<T>
source§impl<T> DivAssign<T> for Rgb<T>
impl<T> DivAssign<T> for Rgb<T>
px * 1
source§fn div_assign(&mut self, r: T)
fn div_assign(&mut self, r: T)
Performs the
/=
operation. Read moresource§impl<T> FromIterator<T> for Rgb<T>
impl<T> FromIterator<T> for Rgb<T>
source§fn from_iter<I: IntoIterator<Item = T>>(into_iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(into_iter: I) -> Self
Takes exactly 3 elements from the iterator and creates a new instance. Panics if there are fewer elements in the iterator.
source§impl<T> MulAssign<T> for Rgb<T>
impl<T> MulAssign<T> for Rgb<T>
px * 1
source§fn mul_assign(&mut self, r: T)
fn mul_assign(&mut self, r: T)
Performs the
*=
operation. Read moresource§impl<T> MulAssign for Rgb<T>
impl<T> MulAssign for Rgb<T>
px * px
source§fn mul_assign(&mut self, other: RGB<T>)
fn mul_assign(&mut self, other: RGB<T>)
Performs the
*=
operation. Read moresource§impl<T: Ord> Ord for Rgb<T>
impl<T: Ord> Ord for Rgb<T>
source§impl<T: PartialOrd> PartialOrd for Rgb<T>
impl<T: PartialOrd> PartialOrd for Rgb<T>
source§impl<T> SubAssign<T> for Rgb<T>
impl<T> SubAssign<T> for Rgb<T>
px - 1
source§fn sub_assign(&mut self, r: T)
fn sub_assign(&mut self, r: T)
Performs the
-=
operation. Read moresource§impl<T> SubAssign for Rgb<T>
impl<T> SubAssign for Rgb<T>
px - px
source§fn sub_assign(&mut self, other: RGB<T>)
fn sub_assign(&mut self, other: RGB<T>)
Performs the
-=
operation. Read moreimpl<T: Copy> Copy for Rgb<T>
impl<T: Eq> Eq for Rgb<T>
impl<T> Pod for Rgb<T>where
T: Pod,
impl<T> StructuralPartialEq for Rgb<T>
Auto Trait Implementations§
impl<T> Freeze for Rgb<T>where
T: Freeze,
impl<T> RefUnwindSafe for Rgb<T>where
T: RefUnwindSafe,
impl<T> Send for Rgb<T>where
T: Send,
impl<T> Sync for Rgb<T>where
T: Sync,
impl<T> Unpin for Rgb<T>where
T: Unpin,
impl<T> UnwindSafe for Rgb<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)