Enum png_decoder::ColorType
source · [−]#[repr(u8)]
pub enum ColorType {
Grayscale,
Rgb,
Palette,
GrayscaleAlpha,
RgbAlpha,
}
Variants
Grayscale
Rgb
Palette
GrayscaleAlpha
RgbAlpha
Implementations
sourceimpl ColorType
impl ColorType
pub fn sample_multiplier(&self) -> usize
Trait Implementations
sourceimpl TryFrom<u8> for ColorType
impl TryFrom<u8> for ColorType
type Error = TryFromPrimitiveError<ColorType>
type Error = TryFromPrimitiveError<ColorType>
The type returned in the event of a conversion error.
sourcefn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for ColorType
impl TryFromPrimitive for ColorType
type Primitive = u8
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for ColorType
impl Eq for ColorType
impl StructuralEq for ColorType
impl StructuralPartialEq for ColorType
Auto Trait Implementations
impl RefUnwindSafe for ColorType
impl Send for ColorType
impl Sync for ColorType
impl Unpin for ColorType
impl UnwindSafe for ColorType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more