#[repr(C)]pub struct YPrimePbPr<ComponentTy = f32> {
pub y: ComponentTy,
pub pb: ComponentTy,
pub pr: ComponentTy,
}Expand description
A color in the Y’PbPr color space. See discussion of the difference between YCbCr, YUV, YPbPr, and Y’PbPr in the YCbCr Wikipedia article
Since Y’PbPr is a relative color space, it is required to know the RGB space which it was transformed from. We define this as being converted from the EncodedSrgb color space.
Fields§
§y: ComponentTyThe Y’ (luma) component.
pb: ComponentTyThe Pb (chroma-blue/yellow) component.
pr: ComponentTyThe Pr (chroma-red/green) component.
Trait Implementations§
Source§impl<ComponentTy> AsMut<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
impl<ComponentTy> AsMut<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
Source§fn as_mut(&mut self) -> &mut [ComponentTy; 3]
fn as_mut(&mut self) -> &mut [ComponentTy; 3]
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<ComponentTy> AsRef<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
impl<ComponentTy> AsRef<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
Source§fn as_ref(&self) -> &[ComponentTy; 3]
fn as_ref(&self) -> &[ComponentTy; 3]
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<ComponentTy: Clone> Clone for YPrimePbPr<ComponentTy>
impl<ComponentTy: Clone> Clone for YPrimePbPr<ComponentTy>
Source§fn clone(&self) -> YPrimePbPr<ComponentTy>
fn clone(&self) -> YPrimePbPr<ComponentTy>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<ComponentTy: Debug> Debug for YPrimePbPr<ComponentTy>
impl<ComponentTy: Debug> Debug for YPrimePbPr<ComponentTy>
Source§impl<ComponentTy> From<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
impl<ComponentTy> From<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
Source§fn from([y, pb, pr]: [ComponentTy; 3]) -> YPrimePbPr<ComponentTy>
fn from([y, pb, pr]: [ComponentTy; 3]) -> YPrimePbPr<ComponentTy>
Converts to this type from the input type.
Source§impl<ComponentTy: Copy> From<Alpha<YPrimePbPr<ComponentTy>>> for YPrimePbPr<ComponentTy>
impl<ComponentTy: Copy> From<Alpha<YPrimePbPr<ComponentTy>>> for YPrimePbPr<ComponentTy>
Source§fn from(col_alpha: Alpha<YPrimePbPr<ComponentTy>>) -> YPrimePbPr<ComponentTy>
fn from(col_alpha: Alpha<YPrimePbPr<ComponentTy>>) -> YPrimePbPr<ComponentTy>
Converts to this type from the input type.
Source§impl<ComponentTy: Copy> From<PremultipliedAlpha<YPrimePbPr<ComponentTy>>> for YPrimePbPr<ComponentTy>
impl<ComponentTy: Copy> From<PremultipliedAlpha<YPrimePbPr<ComponentTy>>> for YPrimePbPr<ComponentTy>
Source§fn from(
col_alpha: PremultipliedAlpha<YPrimePbPr<ComponentTy>>,
) -> YPrimePbPr<ComponentTy>
fn from( col_alpha: PremultipliedAlpha<YPrimePbPr<ComponentTy>>, ) -> YPrimePbPr<ComponentTy>
Converts to this type from the input type.
Source§impl<ComponentTy: Hash> Hash for YPrimePbPr<ComponentTy>
impl<ComponentTy: Hash> Hash for YPrimePbPr<ComponentTy>
Source§impl<ComponentTy> Into<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
impl<ComponentTy> Into<[ComponentTy; 3]> for YPrimePbPr<ComponentTy>
Source§fn into(self) -> [ComponentTy; 3]
fn into(self) -> [ComponentTy; 3]
Converts this type into the (usually inferred) input type.
Source§impl<ComponentTy: Ord> Ord for YPrimePbPr<ComponentTy>
impl<ComponentTy: Ord> Ord for YPrimePbPr<ComponentTy>
Source§fn cmp(&self, other: &YPrimePbPr<ComponentTy>) -> Ordering
fn cmp(&self, other: &YPrimePbPr<ComponentTy>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<ComponentTy: PartialEq> PartialEq for YPrimePbPr<ComponentTy>
impl<ComponentTy: PartialEq> PartialEq for YPrimePbPr<ComponentTy>
Source§impl<ComponentTy: PartialOrd> PartialOrd for YPrimePbPr<ComponentTy>
impl<ComponentTy: PartialOrd> PartialOrd for YPrimePbPr<ComponentTy>
Source§impl<ComponentTy: Zeroable> Zeroable for YPrimePbPr<ComponentTy>
impl<ComponentTy: Zeroable> Zeroable for YPrimePbPr<ComponentTy>
impl<ComponentTy: Copy> Copy for YPrimePbPr<ComponentTy>
impl<ComponentTy: Eq> Eq for YPrimePbPr<ComponentTy>
impl<ComponentTy: Pod> Pod for YPrimePbPr<ComponentTy>
impl<ComponentTy> StructuralPartialEq for YPrimePbPr<ComponentTy>
Auto Trait Implementations§
impl<ComponentTy> Freeze for YPrimePbPr<ComponentTy>where
ComponentTy: Freeze,
impl<ComponentTy> RefUnwindSafe for YPrimePbPr<ComponentTy>where
ComponentTy: RefUnwindSafe,
impl<ComponentTy> Send for YPrimePbPr<ComponentTy>where
ComponentTy: Send,
impl<ComponentTy> Sync for YPrimePbPr<ComponentTy>where
ComponentTy: Sync,
impl<ComponentTy> Unpin for YPrimePbPr<ComponentTy>where
ComponentTy: Unpin,
impl<ComponentTy> UnwindSafe for YPrimePbPr<ComponentTy>where
ComponentTy: 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.