#[repr(u8)]pub enum ImageAlphaType {
Alpha = 0,
AlphaPremultiplied = 1,
}Expand description
Handling of alpha channel.
Variants§
Alpha = 0
Image has separate alpha channel (also called straight/unpremultiplied alpha).
AlphaPremultiplied = 1
Image has colors with premultiplied alpha.
Trait Implementations§
Source§impl CheckedBitPattern for ImageAlphaType
impl CheckedBitPattern for ImageAlphaType
Source§type Bits = u8
type Bits = u8
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(bits: &u8) -> bool
fn is_valid_bit_pattern(bits: &u8) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl Clone for ImageAlphaType
impl Clone for ImageAlphaType
Source§fn clone(&self) -> ImageAlphaType
fn clone(&self) -> ImageAlphaType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Contiguous for ImageAlphaType
impl Contiguous for ImageAlphaType
Source§type Int = u8
type Int = u8
The primitive integer type with an identical representation to this
type. Read more
Source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
If
value is within the range for valid instances of this type,
returns Some(converted_value), otherwise, returns None. Read moreSource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
Perform the conversion from
C into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer Read moreSource§impl Debug for ImageAlphaType
impl Debug for ImageAlphaType
Source§impl PartialEq for ImageAlphaType
impl PartialEq for ImageAlphaType
impl Copy for ImageAlphaType
impl Eq for ImageAlphaType
impl NoUninit for ImageAlphaType
impl StructuralPartialEq for ImageAlphaType
Auto Trait Implementations§
impl Freeze for ImageAlphaType
impl RefUnwindSafe for ImageAlphaType
impl Send for ImageAlphaType
impl Sync for ImageAlphaType
impl Unpin for ImageAlphaType
impl UnwindSafe for ImageAlphaType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more