Struct GrayAlpha_v08
struct GrayAlpha_v08<T, A = T>(603, 604)
A pixel for grayscale value + alpha components (rgb crate v0.8)
Through a Deref hack it renames the fields from .0 and .1
to .v (value) and .a (alpha)
Implementations
impl<T, A> GrayAlpha<T, A>
fn gray_mut(self: &mut Self) -> &mut Gray<T>Provide a mutable view of only
Graycomponent (leaving out alpha).
impl<T: Clone, A> GrayAlpha<T, A>
fn gray(self: &Self) -> Gray<T>Copy
Graycomponent out of theGrayAlphastruct
impl<T: Copy> GrayAlpha_v08<T>
fn value(self: Self) -> TReads the
.vfieldPlease use the
.vfield directly whenever possible. This function isn't necessary, and exists only to ease migration between major versions of the RGB crate.fn value_mut(self: &mut Self) -> &mut TExposes the
.vfield for writingPlease use the
.vfield directly whenever possible. This function isn't necessary, and exists only to ease migration between major versions of the RGB crate.
impl<T: Copy> GrayAlpha_v08<T>
const fn new(value: T, alpha: T) -> SelfCreates a new
GrayAlpha_v08pixel type from its components.Alternatively, you can use struct literal syntax to create the new pixel type:
use rgb::GrayAlpha_v08; let pixel = GrayAlpha_v08 {0 : value, 1 : alpha};
impl<T: Copy, A: Clone> GrayAlpha<T, A>
fn with_alpha(self: &Self, a: A) -> SelfCreate a new
GrayAlphawith the new alpha value, but same gray valuefn map_alpha<F, B>(self: &Self, f: F) -> GrayAlpha<T, B> where F: FnOnce(A) -> BCreate a new
GrayAlphawith a new alpha value created by the callback.fn map_gray<F, U, B>(self: &Self, f: F) -> GrayAlpha<U, B> where F: FnOnce(T) -> U, U: Clone, B: From<A> + CloneCreate new
GrayAlphawith the same alpha value, but differentGrayvalue
impl<P, T> Receiver for GrayAlpha_v08<T, A>
impl<R, S> From for GrayAlpha<S>
fn from(value: (R, R)) -> Self
impl<T> Add for GrayAlpha<T>
fn add(self: Self, r: T) -> <Self as >::Output
impl<T> AddAssign for GrayAlpha<T>
fn add_assign(self: &mut Self, r: T)
impl<T> Any for GrayAlpha_v08<T, A>
fn type_id(self: &Self) -> TypeId
impl<T> AsMut for GrayAlpha<T>
fn as_mut(self: &mut Self) -> &mut T
impl<T> AsRef for GrayAlpha<T>
fn as_ref(self: &Self) -> &T
impl<T> Borrow for GrayAlpha_v08<T, A>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for GrayAlpha_v08<T, A>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for GrayAlpha_v08<T, A>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ComponentSlice for GrayAlpha<T>
fn as_slice(self: &Self) -> &[T]fn as_mut_slice(self: &mut Self) -> &mut [T]
impl<T> Div for GrayAlpha<T>
fn div(self: Self, r: T) -> <Self as >::Output
impl<T> DivAssign for GrayAlpha<T>
fn div_assign(self: &mut Self, r: T)
impl<T> From for GrayAlpha_v08<T, A>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Mul for GrayAlpha<T>
fn mul(self: Self, r: T) -> <Self as >::Output
impl<T> MulAssign for GrayAlpha<T>
fn mul_assign(self: &mut Self, r: T)
impl<T> Sub for GrayAlpha<T>
fn sub(self: Self, r: T) -> <Self as >::Output
impl<T> SubAssign for GrayAlpha<T>
fn sub_assign(self: &mut Self, r: T)
impl<T, A> AddAssign for GrayAlpha<T, A>
fn add_assign(self: &mut Self, other: GrayAlpha<T, A>)
impl<T, A> Deref for GrayAlpha_v08<T, A>
fn deref(self: &Self) -> &GrayA<T, A>A trick that allows using
.vand.aon the oldGrayAlphatype.
impl<T, A> DerefMut for GrayAlpha_v08<T, A>
fn deref_mut(self: &mut Self) -> &mut GrayA<T, A>A trick that allows using
.vand.aon the oldGrayAlphatype.
impl<T, A> Freeze for GrayAlpha_v08<T, A>
impl<T, A> RefUnwindSafe for GrayAlpha_v08<T, A>
impl<T, A> Send for GrayAlpha_v08<T, A>
impl<T, A> StructuralPartialEq for GrayAlpha_v08<T, A>
impl<T, A> SubAssign for GrayAlpha<T, A>
fn sub_assign(self: &mut Self, other: GrayAlpha<T, A>)
impl<T, A> Sum for GrayAlpha<T, A>
fn sum<I: Iterator<Item = Self>>(iter: I) -> Self
impl<T, A> Sync for GrayAlpha_v08<T, A>
impl<T, A> Unpin for GrayAlpha_v08<T, A>
impl<T, A> UnsafeUnpin for GrayAlpha_v08<T, A>
impl<T, A> UnwindSafe for GrayAlpha_v08<T, A>
impl<T, U> Into for GrayAlpha_v08<T, A>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for GrayAlpha_v08<T, A>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for GrayAlpha_v08<T, A>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::clone::Clone, A: $crate::clone::Clone> Clone for GrayAlpha_v08<T, A>
fn clone(self: &Self) -> GrayAlpha_v08<T, A>
impl<T: $crate::cmp::Eq, A: $crate::cmp::Eq> Eq for GrayAlpha_v08<T, A>
impl<T: $crate::cmp::Ord, A: $crate::cmp::Ord> Ord for GrayAlpha_v08<T, A>
fn cmp(self: &Self, other: &GrayAlpha_v08<T, A>) -> Ordering
impl<T: $crate::cmp::PartialEq, A: $crate::cmp::PartialEq> PartialEq for GrayAlpha_v08<T, A>
fn eq(self: &Self, other: &GrayAlpha_v08<T, A>) -> bool
impl<T: $crate::cmp::PartialOrd, A: $crate::cmp::PartialOrd> PartialOrd for GrayAlpha_v08<T, A>
fn partial_cmp(self: &Self, other: &GrayAlpha_v08<T, A>) -> Option<Ordering>
impl<T: $crate::default::Default, A: $crate::default::Default> Default for GrayAlpha_v08<T, A>
fn default() -> GrayAlpha_v08<T, A>
impl<T: $crate::fmt::Debug, A: $crate::fmt::Debug> Debug for GrayAlpha_v08<T, A>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T: $crate::hash::Hash, A: $crate::hash::Hash> Hash for GrayAlpha_v08<T, A>
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl<T: $crate::marker::Copy, A: $crate::marker::Copy> Copy for GrayAlpha_v08<T, A>
impl<T: Add, A: Add> Add for GrayAlpha<T, A>
fn add(self: Self, other: GrayAlpha<T, A>) -> <Self as >::Output
impl<T: Copy> From for GrayAlpha<T, u16>
fn from(other: Gray<T>) -> Self
impl<T: Copy> From for GrayAlpha<T, u8>
fn from(other: Gray<T>) -> Self
impl<T: Copy, A: Copy, B> ColorComponentMap for GrayAlpha<T, A>
fn map_colors<F>(self: &Self, f: F) -> GrayAlpha<B, A> where F: FnMut(T) -> B
impl<T: Copy, B> ComponentMap for GrayAlpha<T>
fn map<F>(self: &Self, f: F) -> GrayAlpha<B> where F: FnMut(T) -> B
impl<T: Sub, A: Sub> Sub for GrayAlpha<T, A>
fn sub(self: Self, other: GrayAlpha<T, A>) -> <Self as >::Output