Struct image::Rgb [] [src]

pub struct Rgb<T: Primitive> {
    pub data: [T; 3],
}

RGB colors

Fields

data

Trait Implementations

impl<T: Primitive + 'static> Pixel for Rgb<T>

type Subpixel = T

fn channel_count() -> u8

fn color_model() -> &'static str

fn color_type() -> ColorType

fn channels(&self) -> &[T]

fn channels_mut(&mut self) -> &mut [T]

fn channels4(&self) -> (T, T, T, T)

fn from_channels(a: T, b: T, c: T, d: T) -> Rgb<T>

fn from_slice<'a>(slice: &'a [T]) -> &'a Rgb<T>

fn from_slice_mut<'a>(slice: &'a mut [T]) -> &'a mut Rgb<T>

fn to_rgb(&self) -> Rgb<T>

fn to_rgba(&self) -> Rgba<T>

fn to_luma(&self) -> Luma<T>

fn to_luma_alpha(&self) -> LumaA<T>

fn map<F>(&self, f: F) -> Rgb<T> where F: Fn(T) -> T

fn apply<F>(&mut self, f: F) where F: Fn(T) -> T

fn map_with_alpha<F, G>(&self, f: F, g: G) -> Rgb<T> where F: Fn(T) -> T, G: Fn(T) -> T

fn apply_with_alpha<F, G>(&mut self, f: F, g: G) where F: Fn(T) -> T, G: Fn(T) -> T

fn map2<F>(&self, other: &Self, f: F) -> Rgb<T> where F: Fn(T, T) -> T

fn apply2<F>(&mut self, other: &Rgb<T>, f: F) where F: Fn(T, T) -> T

fn invert(&mut self)

fn blend(&mut self, other: &Rgb<T>)

impl<T: Primitive> Index<usize> for Rgb<T>

type Output = T

fn index<'a>(&'a self, _index: usize) -> &'a T

impl<T: Primitive> IndexMut<usize> for Rgb<T>

fn index_mut<'a>(&'a mut self, _index: usize) -> &'a mut T

Derived Implementations

impl<T: Hash + Primitive> Hash for Rgb<T>

fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<T: Copy + Primitive> Copy for Rgb<T>

impl<T: Debug + Primitive> Debug for Rgb<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<T: Clone + Primitive> Clone for Rgb<T>

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

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

impl<T: Eq + Primitive> Eq for Rgb<T>

impl<T: PartialEq + Primitive> PartialEq for Rgb<T>

fn eq(&self, __arg_0: &Rgb<T>) -> bool

fn ne(&self, __arg_0: &Rgb<T>) -> bool