Struct rgb::alt::Gray [−][src]
Grayscale. Use .0
or *
(deref) to access the value.
Implementations
impl<T> Gray<T>
[src]
Trait Implementations
impl<T: Add> Add<Gray<T>> for Gray<T>
[src]
px + px
type Output = Gray<<T as Add>::Output>
The resulting type after applying the +
operator.
fn add(self, other: Gray<T>) -> Self::Output
[src]
impl<T> Add<T> for Gray<T> where
T: Copy + Add<Output = T>,
[src]
T: Copy + Add<Output = T>,
px + 1
type Output = Gray<T>
The resulting type after applying the +
operator.
fn add(self, r: T) -> Self::Output
[src]
impl<T> AddAssign<Gray<T>> for Gray<T> where
T: Add<Output = T> + Copy,
[src]
T: Add<Output = T> + Copy,
px + px
fn add_assign(&mut self, other: Gray<T>)
[src]
impl<T> AddAssign<T> for Gray<T> where
T: Copy + Add<Output = T>,
[src]
T: Copy + Add<Output = T>,
px + 1
fn add_assign(&mut self, r: T)
[src]
impl<T> AsMut<T> for Gray<T>
[src]
impl<T> AsPixels<Gray<T>> for [T]
[src]
impl<T> AsRef<T> for Gray<T>
[src]
impl<ComponentType: Clone> Clone for Gray<ComponentType>
[src]
impl<T: Copy, B> ComponentMap<Gray<B>, T, B> for Gray<T>
[src]
impl<T> ComponentSlice<T> for Gray<T>
[src]
impl<ComponentType: Copy> Copy for Gray<ComponentType>
[src]
impl<ComponentType: Debug> Debug for Gray<ComponentType>
[src]
impl<ComponentType: Default> Default for Gray<ComponentType>
[src]
impl<T> Deref for Gray<T>
[src]
impl<'de, ComponentType> Deserialize<'de> for Gray<ComponentType> where
ComponentType: Deserialize<'de>,
[src]
ComponentType: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T> Div<T> for Gray<T> where
T: Copy + Div<Output = T>,
[src]
T: Copy + Div<Output = T>,
px / 1
type Output = Gray<T>
The resulting type after applying the /
operator.
fn div(self, r: T) -> Self::Output
[src]
impl<T> DivAssign<T> for Gray<T> where
T: Copy + Div<Output = T>,
[src]
T: Copy + Div<Output = T>,
px * 1
fn div_assign(&mut self, r: T)
[src]
impl<ComponentType: Eq> Eq for Gray<ComponentType>
[src]
impl<T: Clone> From<Gray<T>> for RGB<T>
[src]
impl<T: Copy> From<Gray<T>> for GrayAlpha<T, u8>
[src]
Assumes 255 is opaque
impl<T: Copy> From<Gray<T>> for GrayAlpha<T, u16>
[src]
Assumes 65535 is opaque
impl<T: Copy> From<T> for Gray<T>
[src]
impl<ComponentType: Hash> Hash for Gray<ComponentType>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Mul<T> for Gray<T> where
T: Copy + Mul<Output = T>,
[src]
T: Copy + Mul<Output = T>,
px * 1
type Output = Gray<T>
The resulting type after applying the *
operator.
fn mul(self, r: T) -> Self::Output
[src]
impl<T> MulAssign<T> for Gray<T> where
T: Copy + Mul<Output = T>,
[src]
T: Copy + Mul<Output = T>,
px * 1
fn mul_assign(&mut self, r: T)
[src]
impl<ComponentType: Ord> Ord for Gray<ComponentType>
[src]
fn cmp(&self, other: &Gray<ComponentType>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<ComponentType: PartialEq> PartialEq<Gray<ComponentType>> for Gray<ComponentType>
[src]
fn eq(&self, other: &Gray<ComponentType>) -> bool
[src]
fn ne(&self, other: &Gray<ComponentType>) -> bool
[src]
impl<ComponentType: PartialOrd> PartialOrd<Gray<ComponentType>> for Gray<ComponentType>
[src]
fn partial_cmp(&self, other: &Gray<ComponentType>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> Pod for Gray<T> where
T: Pod,
[src]
T: Pod,
impl<ComponentType> Serialize for Gray<ComponentType> where
ComponentType: Serialize,
[src]
ComponentType: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<ComponentType> StructuralEq for Gray<ComponentType>
[src]
impl<ComponentType> StructuralPartialEq for Gray<ComponentType>
[src]
impl<T: Sub> Sub<Gray<T>> for Gray<T>
[src]
px - px
type Output = Gray<<T as Sub>::Output>
The resulting type after applying the -
operator.
fn sub(self, other: Gray<T>) -> Self::Output
[src]
impl<T> Sub<T> for Gray<T> where
T: Copy + Sub<Output = T>,
[src]
T: Copy + Sub<Output = T>,
px - 1
type Output = Gray<<T as Sub>::Output>
The resulting type after applying the -
operator.
fn sub(self, r: T) -> Self::Output
[src]
impl<T> SubAssign<Gray<T>> for Gray<T> where
T: Sub<Output = T> + Copy,
[src]
T: Sub<Output = T> + Copy,
px - px
fn sub_assign(&mut self, other: Gray<T>)
[src]
impl<T> SubAssign<T> for Gray<T> where
T: Copy + Sub<Output = T>,
[src]
T: Copy + Sub<Output = T>,
px - 1
fn sub_assign(&mut self, r: T)
[src]
impl<T> Sum<Gray<T>> for Gray<T> where
T: Default + Add<Output = T>,
[src]
T: Default + Add<Output = T>,
impl<T> Zeroable for Gray<T> where
T: Zeroable,
[src]
T: Zeroable,
Auto Trait Implementations
impl<ComponentType> RefUnwindSafe for Gray<ComponentType> where
ComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
impl<ComponentType> Send for Gray<ComponentType> where
ComponentType: Send,
ComponentType: Send,
impl<ComponentType> Sync for Gray<ComponentType> where
ComponentType: Sync,
ComponentType: Sync,
impl<ComponentType> Unpin for Gray<ComponentType> where
ComponentType: Unpin,
ComponentType: Unpin,
impl<ComponentType> UnwindSafe for Gray<ComponentType> where
ComponentType: UnwindSafe,
ComponentType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,