[][src]Struct image2::PixelVec

pub struct PixelVec<T: Type>(_);

PixelVec is a 4-channel pixel backed by a static array

Methods

impl<T: Type> PixelVec<T>[src]

pub fn empty() -> PixelVec<T>[src]

Create a new PixelVec, each channel set to 0

pub fn new(a: T, b: T, c: T, d: T) -> PixelVec<T>[src]

Create a new PixelVec with the given values

pub fn new_gray(a: T) -> PixelVec<T>[src]

Create a new PixelBec with every channel set to the given value. The alpha channel is set to T::max()

pub fn from_pixel<P: AsRef<[T]>>(pixel: P) -> PixelVec<T>[src]

Create a new PixelVec from an existing Pixel

pub fn map<U: Type, F: Fn(&T) -> U>(&self, f: F) -> PixelVec<U>[src]

Create a new PixelVec by mapping f over an existing PixelVec

pub fn to_vec<C: Color>(&self) -> Vec<T>[src]

Convert from PixelVec<T> to Vec<T>

pub fn to_vec_f<C: Color>(&self) -> Vec<f64>[src]

Convert from PixelVec<T> to Vec<f64> and normalize values

pub fn to_float(&self) -> PixelVec<f64>[src]

Convert from PixelVec<T> to PixelVec<f64>

pub fn to_f(&self) -> PixelVec<f64>[src]

Convert from PixelVec<T> to PixelVec<f64> and normalize values

Trait Implementations

impl<'a, T: Type, C: Color> Pixel<'a, T, C> for PixelVec<T>[src]

impl<'a, T: Type, C: Color> PixelMut<'a, T, C> for PixelVec<T>[src]

impl<T: Type> AsRef<[T]> for PixelVec<T>[src]

impl<T: Type> AsMut<[T]> for PixelVec<T>[src]

impl<T: Clone + Type> Clone for PixelVec<T>[src]

impl<T: Copy + Type> Copy for PixelVec<T>[src]

impl<T: Debug + Type> Debug for PixelVec<T>[src]

impl<T: Type> Div<PixelVec<T>> for PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the / operator.

impl<'a, T: Type> Div<&'a PixelVec<T>> for &'a PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the / operator.

impl<T: Type> Rem<PixelVec<T>> for PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the % operator.

impl<'a, T: Type> Rem<&'a PixelVec<T>> for &'a PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the % operator.

impl<T: Type> Sub<PixelVec<T>> for PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the - operator.

impl<'a, T: Type> Sub<&'a PixelVec<T>> for &'a PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the - operator.

impl<T: Type> Add<PixelVec<T>> for PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the + operator.

impl<'a, T: Type> Add<&'a PixelVec<T>> for &'a PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the + operator.

impl<T: Type> Mul<PixelVec<T>> for PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the * operator.

impl<'a, T: Type> Mul<&'a PixelVec<T>> for &'a PixelVec<T>[src]

type Output = PixelVec<T>

The resulting type after applying the * operator.

impl<T: Type> AddAssign<PixelVec<T>> for PixelVec<T>[src]

impl<'a, T: Type> AddAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>[src]

impl<T: Type> SubAssign<PixelVec<T>> for PixelVec<T>[src]

impl<'a, T: Type> SubAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>[src]

impl<T: Type> MulAssign<PixelVec<T>> for PixelVec<T>[src]

impl<'a, T: Type> MulAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>[src]

impl<T: Type> DivAssign<PixelVec<T>> for PixelVec<T>[src]

impl<'a, T: Type> DivAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>[src]

impl<T: Type> RemAssign<PixelVec<T>> for PixelVec<T>[src]

impl<'a, T: Type> RemAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>[src]

impl<T: Type> Serialize for PixelVec<T> where
    T: Serialize
[src]

impl<'de, T: Type> Deserialize<'de> for PixelVec<T> where
    T: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<T> Send for PixelVec<T>

impl<T> Sync for PixelVec<T>

impl<T> Unpin for PixelVec<T> where
    T: Unpin

impl<T> UnwindSafe for PixelVec<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for PixelVec<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]