Struct rgb::RGB [−][src]
#[repr(C)]pub struct RGB<ComponentType> { pub r: ComponentType, pub g: ComponentType, pub b: ComponentType, }
The RGB pixel
The component type can be u8
(aliased as RGB8
), u16
(aliased as RGB16
),
or any other type (but simple copyable types are recommended.)
Fields
r: ComponentType
Red
g: ComponentType
Green
b: ComponentType
Blue
Implementations
Trait Implementations
impl<T> AddAssign<RGB<T>> for RGB<T> where
T: Add<Output = T> + Copy,
[src]
impl<T> AddAssign<RGB<T>> for RGB<T> where
T: Add<Output = T> + Copy,
[src]px + px
fn add_assign(&mut self, other: RGB<T>)
[src]
fn add_assign(&mut self, other: RGB<T>)
[src]Performs the +=
operation. Read more
impl<T> AddAssign<T> for RGB<T> where
T: Copy + Add<Output = T>,
[src]
impl<T> AddAssign<T> for RGB<T> where
T: Copy + Add<Output = T>,
[src]px + 1
fn add_assign(&mut self, r: T)
[src]
fn add_assign(&mut self, r: T)
[src]Performs the +=
operation. Read more
impl<T> AsPixels<RGB<T>> for [T]
[src]
impl<T> AsPixels<RGB<T>> for [T]
[src]impl<T: Copy, B> ColorComponentMap<RGB<B>, T, B> for RGB<T>
[src]
impl<T: Copy, B> ColorComponentMap<RGB<B>, T, B> for RGB<T>
[src]impl<T: Copy, B> ComponentMap<RGB<B>, T, B> for RGB<T>
[src]
impl<T: Copy, B> ComponentMap<RGB<B>, T, B> for RGB<T>
[src]impl<T> ComponentSlice<T> for RGB<T>
[src]
impl<T> ComponentSlice<T> for RGB<T>
[src]impl<'de, ComponentType> Deserialize<'de> for RGB<ComponentType> where
ComponentType: Deserialize<'de>,
[src]
impl<'de, ComponentType> Deserialize<'de> for RGB<ComponentType> where
ComponentType: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<T> DivAssign<T> for RGB<T> where
T: Copy + Div<Output = T>,
[src]
impl<T> DivAssign<T> for RGB<T> where
T: Copy + Div<Output = T>,
[src]px * 1
fn div_assign(&mut self, r: T)
[src]
fn div_assign(&mut self, r: T)
[src]Performs the /=
operation. Read more
impl<T> FromIterator<T> for RGB<T>
[src]
impl<T> FromIterator<T> for RGB<T>
[src]fn from_iter<I: IntoIterator<Item = T>>(into_iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = T>>(into_iter: I) -> Self
[src]Takes exactly 3 elements from the iterator and creates a new instance. Panics if there are fewer elements in the iterator.
impl<T> MulAssign<T> for RGB<T> where
T: Copy + Mul<Output = T>,
[src]
impl<T> MulAssign<T> for RGB<T> where
T: Copy + Mul<Output = T>,
[src]px * 1
fn mul_assign(&mut self, r: T)
[src]
fn mul_assign(&mut self, r: T)
[src]Performs the *=
operation. Read more
impl<ComponentType: Ord> Ord for RGB<ComponentType>
[src]
impl<ComponentType: Ord> Ord for RGB<ComponentType>
[src]impl<ComponentType: PartialOrd> PartialOrd<RGB<ComponentType>> for RGB<ComponentType>
[src]
impl<ComponentType: PartialOrd> PartialOrd<RGB<ComponentType>> for RGB<ComponentType>
[src]fn partial_cmp(&self, other: &RGB<ComponentType>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RGB<ComponentType>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<T> SubAssign<RGB<T>> for RGB<T> where
T: Sub<Output = T> + Copy,
[src]
impl<T> SubAssign<RGB<T>> for RGB<T> where
T: Sub<Output = T> + Copy,
[src]px - px
fn sub_assign(&mut self, other: RGB<T>)
[src]
fn sub_assign(&mut self, other: RGB<T>)
[src]Performs the -=
operation. Read more
impl<T> SubAssign<T> for RGB<T> where
T: Copy + Sub<Output = T>,
[src]
impl<T> SubAssign<T> for RGB<T> where
T: Copy + Sub<Output = T>,
[src]px - 1
fn sub_assign(&mut self, r: T)
[src]
fn sub_assign(&mut self, r: T)
[src]Performs the -=
operation. Read more
impl<ComponentType: Copy> Copy for RGB<ComponentType>
[src]
impl<ComponentType: Eq> Eq for RGB<ComponentType>
[src]
impl<T> Pod for RGB<T> where
T: Pod,
[src]
T: Pod,
impl<ComponentType> StructuralEq for RGB<ComponentType>
[src]
impl<ComponentType> StructuralPartialEq for RGB<ComponentType>
[src]
Auto Trait Implementations
impl<ComponentType> RefUnwindSafe for RGB<ComponentType> where
ComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
impl<ComponentType> Send for RGB<ComponentType> where
ComponentType: Send,
ComponentType: Send,
impl<ComponentType> Sync for RGB<ComponentType> where
ComponentType: Sync,
ComponentType: Sync,
impl<ComponentType> Unpin for RGB<ComponentType> where
ComponentType: Unpin,
ComponentType: Unpin,
impl<ComponentType> UnwindSafe for RGB<ComponentType> where
ComponentType: UnwindSafe,
ComponentType: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,