Enum BitDepth

#[repr(u8)]
pub enum BitDepth

Bit depth of the PNG file. Specifies the number of bits per sample.

Variants

One = 1
Two = 2
Four = 4
Eight = 8
Sixteen = 16

Implementations

impl BitDepth

fn from_u8(n: u8) -> Option<BitDepth>

u8 -> Self. Temporary solution until Rust provides a canonical one.

Trait Implementations

impl Clone for BitDepth

fn clone(&self) -> Self

impl Copy for BitDepth

impl Debug for BitDepth

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for BitDepth

impl PartialEq for BitDepth

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for BitDepth

Auto Trait Implementations

impl Freeze for BitDepth

impl RefUnwindSafe for BitDepth

impl Send for BitDepth

impl Sync for BitDepth

impl Unpin for BitDepth

impl UnsafeUnpin for BitDepth

impl UnwindSafe for BitDepth

Blanket Implementations

impl<T> Any for BitDepth where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for BitDepth where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for BitDepth where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for BitDepth where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for BitDepth

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for BitDepth where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for BitDepth where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for BitDepth where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for BitDepth where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>