Struct rgb::alt::GrayAlpha [−][src]
Grayscale with alpha. Use .0
/.1
to access.
Implementations
impl<T: Clone, A> GrayAlpha<T, A>
[src]
impl<T, A> GrayAlpha<T, A>
[src]
pub fn gray_mut(&mut self) -> &mut Gray<T>
[src]
Provide a mutable view of only Gray
component (leaving out alpha).
impl<T: Copy, A: Clone> GrayAlpha<T, A>
[src]
pub fn alpha(&self, a: A) -> Self
[src]
Create a new GrayAlpha
with the new alpha value, but same gray value
pub fn map_alpha<F, B>(&self, f: F) -> GrayAlpha<T, B> where
F: FnOnce(A) -> B,
[src]
F: FnOnce(A) -> B,
Create a new GrayAlpha
with a new alpha value created by the callback.
pub fn map_gray<F, U, B>(&self, f: F) -> GrayAlpha<U, B> where
F: FnOnce(T) -> U,
U: Clone,
B: From<A> + Clone,
[src]
F: FnOnce(T) -> U,
U: Clone,
B: From<A> + Clone,
Create new GrayAlpha
with the same alpha value, but different Gray
value
Trait Implementations
impl<T> AsMut<T> for GrayAlpha<T>
[src]
impl<T> AsPixels<GrayAlpha<T, T>> for [T]
[src]
impl<T> AsRef<T> for GrayAlpha<T>
[src]
impl<ComponentType: Clone, AlphaComponentType: Clone> Clone for GrayAlpha<ComponentType, AlphaComponentType>
[src]
fn clone(&self) -> GrayAlpha<ComponentType, AlphaComponentType>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy, B> ComponentMap<GrayAlpha<B, B>, T, B> for GrayAlpha<T>
[src]
impl<T> ComponentSlice<T> for GrayAlpha<T>
[src]
fn as_slice(&self) -> &[T]
[src]
fn as_mut_slice(&mut self) -> &mut [T]
[src]
impl<ComponentType: Copy, AlphaComponentType: Copy> Copy for GrayAlpha<ComponentType, AlphaComponentType>
[src]
impl<ComponentType: Debug, AlphaComponentType: Debug> Debug for GrayAlpha<ComponentType, AlphaComponentType>
[src]
impl<ComponentType: Default, AlphaComponentType: Default> Default for GrayAlpha<ComponentType, AlphaComponentType>
[src]
impl<ComponentType: Eq, AlphaComponentType: Eq> Eq for GrayAlpha<ComponentType, AlphaComponentType>
[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: Clone, A> From<GrayAlpha<T, A>> for RGBA<T, A>
[src]
impl<ComponentType: Hash, AlphaComponentType: Hash> Hash for GrayAlpha<ComponentType, AlphaComponentType>
[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<ComponentType: Ord, AlphaComponentType: Ord> Ord for GrayAlpha<ComponentType, AlphaComponentType>
[src]
fn cmp(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> 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, AlphaComponentType: PartialEq> PartialEq<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType>
[src]
fn eq(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
fn ne(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType>
[src]
fn partial_cmp(
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
[src]
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
#[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<ComponentType, AlphaComponentType> StructuralEq for GrayAlpha<ComponentType, AlphaComponentType>
[src]
impl<ComponentType, AlphaComponentType> StructuralPartialEq for GrayAlpha<ComponentType, AlphaComponentType>
[src]
Auto Trait Implementations
impl<ComponentType, AlphaComponentType> Send for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Send,
ComponentType: Send,
AlphaComponentType: Send,
ComponentType: Send,
impl<ComponentType, AlphaComponentType> Sync for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Sync,
ComponentType: Sync,
AlphaComponentType: Sync,
ComponentType: Sync,
impl<ComponentType, AlphaComponentType> Unpin for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Unpin,
ComponentType: Unpin,
AlphaComponentType: Unpin,
ComponentType: Unpin,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,