Enum png::common::BytesPerPixel
source · #[repr(u8)]pub(crate) enum BytesPerPixel {
One = 1,
Two = 2,
Three = 3,
Four = 4,
Six = 6,
Eight = 8,
}
Expand description
Internal count of bytes per pixel. This is used for filtering which never uses sub-byte units. This essentially reduces the number of possible byte chunk lengths to a very small set of values appropriate to be defined as an enum.
Variants§
Implementations§
source§impl BytesPerPixel
impl BytesPerPixel
pub(crate) fn from_usize(bpp: usize) -> Self
pub(crate) fn into_usize(self) -> usize
Trait Implementations§
source§impl Clone for BytesPerPixel
impl Clone for BytesPerPixel
source§fn clone(&self) -> BytesPerPixel
fn clone(&self) -> BytesPerPixel
Returns a copy 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 Debug for BytesPerPixel
impl Debug for BytesPerPixel
impl Copy for BytesPerPixel
Auto Trait Implementations§
impl Freeze for BytesPerPixel
impl RefUnwindSafe for BytesPerPixel
impl Send for BytesPerPixel
impl Sync for BytesPerPixel
impl Unpin for BytesPerPixel
impl UnwindSafe for BytesPerPixel
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