Struct plot_interface::dependency::rgb::RGB
[−]#[repr(C)]pub struct RGB<ComponentType> {
pub r: ComponentType,
pub g: ComponentType,
pub b: ComponentType,
}Expand description
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: ComponentTypeRed
g: ComponentTypeGreen
b: ComponentTypeBlue
Implementations
Trait Implementations
impl<T> AddAssign<RGB<T>> for RGB<T> where
T: Add<T, Output = T> + Copy,
impl<T> AddAssign<RGB<T>> for RGB<T> where
T: Add<T, Output = T> + Copy,
px + px
fn add_assign(&mut self, other: RGB<T>)
fn add_assign(&mut self, other: RGB<T>)
Performs the += operation. Read more
impl<T> AddAssign<T> for RGB<T> where
T: Copy + Add<T, Output = T>,
impl<T> AddAssign<T> for RGB<T> where
T: Copy + Add<T, Output = T>,
px + 1
fn add_assign(&mut self, r: T)
fn add_assign(&mut self, r: T)
Performs the += operation. Read more
impl<T> AsPixels<RGB<T>> for [T]
impl<T> AsPixels<RGB<T>> for [T]
fn as_pixels(&self) -> &[RGB<T>]
fn as_pixels(&self) -> &[RGB<T>]
Reinterpret the slice as a read-only/shared slice of pixels. Multiple consecutive elements in the slice are intepreted as a single pixel (depending on format, e.g. 3 for RGB, 4 for RGBA). Read more
fn as_pixels_mut(&mut self) -> &mut [RGB<T>]
fn as_pixels_mut(&mut self) -> &mut [RGB<T>]
Reinterpret the slice as a mutable/exclusive slice of pixels. Multiple consecutive elements in the slice are intepreted as a single pixel (depending on format, e.g. 3 for RGB, 4 for RGBA). Read more
impl<T, B> ColorComponentMap<RGB<B>, T, B> for RGB<T> where
T: Copy,
impl<T, B> ColorComponentMap<RGB<B>, T, B> for RGB<T> where
T: Copy,
impl<T, B> ComponentMap<RGB<B>, T, B> for RGB<T> where
T: Copy,
impl<T, B> ComponentMap<RGB<B>, T, B> for RGB<T> where
T: Copy,
impl<T> ComponentSlice<T> for RGB<T>
impl<T> ComponentSlice<T> for RGB<T>
impl<T> DivAssign<T> for RGB<T> where
T: Copy + Div<T, Output = T>,
impl<T> DivAssign<T> for RGB<T> where
T: Copy + Div<T, Output = T>,
px * 1
fn div_assign(&mut self, r: T)
fn div_assign(&mut self, r: T)
Performs the /= operation. Read more
impl<T> FromIterator<T> for RGB<T>
impl<T> FromIterator<T> for RGB<T>
fn from_iter<I>(into_iter: I) -> RGB<T> where
I: IntoIterator<Item = T>,
fn from_iter<I>(into_iter: I) -> RGB<T> where
I: IntoIterator<Item = T>,
Takes exactly 3 elements from the iterator and creates a new instance. Panics if there are fewer elements in the iterator.
impl<T> MulAssign<RGB<T>> for RGB<T> where
T: Mul<T, Output = T> + Copy,
impl<T> MulAssign<RGB<T>> for RGB<T> where
T: Mul<T, Output = T> + Copy,
px * px
fn mul_assign(&mut self, other: RGB<T>)
fn mul_assign(&mut self, other: RGB<T>)
Performs the *= operation. Read more
impl<T> MulAssign<T> for RGB<T> where
T: Copy + Mul<T, Output = T>,
impl<T> MulAssign<T> for RGB<T> where
T: Copy + Mul<T, Output = T>,
px * 1
fn mul_assign(&mut self, r: T)
fn mul_assign(&mut self, r: T)
Performs the *= operation. Read more
impl<ComponentType> Ord for RGB<ComponentType> where
ComponentType: Ord,
impl<ComponentType> Ord for RGB<ComponentType> where
ComponentType: Ord,
impl<ComponentType> PartialEq<RGB<ComponentType>> for RGB<ComponentType> where
ComponentType: PartialEq<ComponentType>,
impl<ComponentType> PartialEq<RGB<ComponentType>> for RGB<ComponentType> where
ComponentType: PartialEq<ComponentType>,
impl<ComponentType> PartialOrd<RGB<ComponentType>> for RGB<ComponentType> where
ComponentType: PartialOrd<ComponentType>,
impl<ComponentType> PartialOrd<RGB<ComponentType>> for RGB<ComponentType> where
ComponentType: PartialOrd<ComponentType>,
fn partial_cmp(&self, other: &RGB<ComponentType>) -> Option<Ordering>
fn partial_cmp(&self, other: &RGB<ComponentType>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
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<T, Output = T> + Copy,
impl<T> SubAssign<RGB<T>> for RGB<T> where
T: Sub<T, Output = T> + Copy,
px - px
fn sub_assign(&mut self, other: RGB<T>)
fn sub_assign(&mut self, other: RGB<T>)
Performs the -= operation. Read more
impl<T> SubAssign<T> for RGB<T> where
T: Copy + Sub<T, Output = T>,
impl<T> SubAssign<T> for RGB<T> where
T: Copy + Sub<T, Output = T>,
px - 1
fn sub_assign(&mut self, r: T)
fn sub_assign(&mut self, r: T)
Performs the -= operation. Read more
impl<ComponentType> Copy for RGB<ComponentType> where
ComponentType: Copy,
impl<ComponentType> Eq for RGB<ComponentType> where
ComponentType: Eq,
impl<T> Pod for RGB<T> where
T: Pod,
impl<ComponentType> StructuralEq for RGB<ComponentType>
impl<ComponentType> StructuralPartialEq for RGB<ComponentType>
Auto Trait Implementations
impl<ComponentType> RefUnwindSafe for RGB<ComponentType> where
ComponentType: RefUnwindSafe,
impl<ComponentType> Send for RGB<ComponentType> where
ComponentType: Send,
impl<ComponentType> Sync for RGB<ComponentType> where
ComponentType: Sync,
impl<ComponentType> Unpin for RGB<ComponentType> where
ComponentType: Unpin,
impl<ComponentType> UnwindSafe for RGB<ComponentType> where
ComponentType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
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. Read more
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.
impl<Target, Original> Into2<Target> for Original where
Target: From2<Original>,
impl<Target, Original> Into2<Target> for Original where
Target: From2<Original>,
fn into2(self) -> Target
fn into2(self) -> Target
Performs the conversion.
impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
sourceimpl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
sourcefn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.
