[][src]Struct lodepng::Grey

#[repr(C)]pub struct Grey<ComponentType>(pub ComponentType);

Grayscale. Use .0 or * (deref) to access the value.

Implementations

impl<T> Gray<T>[src]

pub fn new(brightness: T) -> Gray<T>[src]

New grayscale pixel

Trait Implementations

impl<T> Add<Gray<T>> for Gray<T> where
    T: Add<T>, 
[src]

px + px

type Output = Gray<<T as Add<T>>::Output>

The resulting type after applying the + operator.

impl<T> Add<T> for Gray<T> where
    T: Copy + Add<T, Output = T>, 
[src]

px + 1

type Output = Gray<T>

The resulting type after applying the + operator.

impl<T> AddAssign<Gray<T>> for Gray<T> where
    T: Add<T, Output = T> + Copy
[src]

px + px

impl<T> AddAssign<T> for Gray<T> where
    T: Copy + Add<T, Output = T>, 
[src]

px + 1

impl<T> AsMut<T> for Gray<T>[src]

impl<T> AsRef<T> for Gray<T>[src]

impl<ComponentType> Clone for Gray<ComponentType> where
    ComponentType: Clone
[src]

impl<T, B> ComponentMap<Gray<B>, T, B> for Gray<T> where
    T: Copy
[src]

impl<T> ComponentSlice<T> for Gray<T>[src]

impl<ComponentType> Copy for Gray<ComponentType> where
    ComponentType: Copy
[src]

impl<ComponentType> Debug for Gray<ComponentType> where
    ComponentType: Debug
[src]

impl<ComponentType> Default for Gray<ComponentType> where
    ComponentType: Default
[src]

impl<T> Deref for Gray<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> Div<T> for Gray<T> where
    T: Copy + Div<T, Output = T>, 
[src]

px / 1

type Output = Gray<T>

The resulting type after applying the / operator.

impl<T> DivAssign<T> for Gray<T> where
    T: Copy + Div<T, Output = T>, 
[src]

px * 1

impl<ComponentType> Eq for Gray<ComponentType> where
    ComponentType: Eq
[src]

impl<T> From<Gray<T>> for GrayAlpha<T, u16> where
    T: Copy
[src]

Assumes 65535 is opaque

impl<T> From<Gray<T>> for RGB<T> where
    T: Clone
[src]

impl<T> From<Gray<T>> for GrayAlpha<T, u8> where
    T: Copy
[src]

Assumes 255 is opaque

impl<T> From<T> for Gray<T> where
    T: Copy
[src]

impl<ComponentType> Hash for Gray<ComponentType> where
    ComponentType: Hash
[src]

impl<T> Mul<T> for Gray<T> where
    T: Copy + Mul<T, Output = T>, 
[src]

px * 1

type Output = Gray<T>

The resulting type after applying the * operator.

impl<T> MulAssign<T> for Gray<T> where
    T: Copy + Mul<T, Output = T>, 
[src]

px * 1

impl<ComponentType> Ord for Gray<ComponentType> where
    ComponentType: Ord
[src]

impl<ComponentType> PartialEq<Gray<ComponentType>> for Gray<ComponentType> where
    ComponentType: PartialEq<ComponentType>, 
[src]

impl<ComponentType> PartialOrd<Gray<ComponentType>> for Gray<ComponentType> where
    ComponentType: PartialOrd<ComponentType>, 
[src]

impl<T> Pod for Gray<T> where
    T: Pod
[src]

impl<ComponentType> StructuralEq for Gray<ComponentType>[src]

impl<ComponentType> StructuralPartialEq for Gray<ComponentType>[src]

impl<T> Sub<Gray<T>> for Gray<T> where
    T: Sub<T>, 
[src]

px - px

type Output = Gray<<T as Sub<T>>::Output>

The resulting type after applying the - operator.

impl<T> Sub<T> for Gray<T> where
    T: Copy + Sub<T, Output = T>, 
[src]

px - 1

type Output = Gray<<T as Sub<T>>::Output>

The resulting type after applying the - operator.

impl<T> SubAssign<Gray<T>> for Gray<T> where
    T: Sub<T, Output = T> + Copy
[src]

px - px

impl<T> SubAssign<T> for Gray<T> where
    T: Copy + Sub<T, Output = T>, 
[src]

px - 1

impl<T> Sum<Gray<T>> for Gray<T> where
    T: Default + Add<T, Output = T>, 
[src]

impl<T> Zeroable for Gray<T> where
    T: Zeroable, 
[src]

Auto Trait Implementations

impl<ComponentType> RefUnwindSafe for Gray<ComponentType> where
    ComponentType: RefUnwindSafe
[src]

impl<ComponentType> Send for Gray<ComponentType> where
    ComponentType: Send
[src]

impl<ComponentType> Sync for Gray<ComponentType> where
    ComponentType: Sync
[src]

impl<ComponentType> Unpin for Gray<ComponentType> where
    ComponentType: Unpin
[src]

impl<ComponentType> UnwindSafe for Gray<ComponentType> where
    ComponentType: UnwindSafe
[src]

Blanket Implementations

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

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

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

impl<T> CallHasher for T where
    T: Hash

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

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

impl<T, U> Into<U> for T where
    U: From<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.