Enum image::codecs::pnm::PnmSubtype
source · pub enum PnmSubtype {
Bitmap(SampleEncoding),
Graymap(SampleEncoding),
Pixmap(SampleEncoding),
ArbitraryMap,
}
Expand description
Denotes the category of the magic number
Variants§
Bitmap(SampleEncoding)
Magic numbers P1 and P4
Graymap(SampleEncoding)
Magic numbers P2 and P5
Pixmap(SampleEncoding)
Magic numbers P3 and P6
ArbitraryMap
Magic number P7
Implementations§
source§impl PnmSubtype
impl PnmSubtype
sourcepub fn magic_constant(self) -> &'static [u8; 2]
pub fn magic_constant(self) -> &'static [u8; 2]
Get the two magic constant bytes corresponding to this format subtype.
sourcepub fn sample_encoding(self) -> SampleEncoding
pub fn sample_encoding(self) -> SampleEncoding
Whether samples are stored as binary or as decimal ascii
Trait Implementations§
source§impl Clone for PnmSubtype
impl Clone for PnmSubtype
source§fn clone(&self) -> PnmSubtype
fn clone(&self) -> PnmSubtype
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 PnmSubtype
impl Debug for PnmSubtype
source§impl PartialEq for PnmSubtype
impl PartialEq for PnmSubtype
source§fn eq(&self, other: &PnmSubtype) -> bool
fn eq(&self, other: &PnmSubtype) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PnmSubtype
impl Eq for PnmSubtype
impl StructuralPartialEq for PnmSubtype
Auto Trait Implementations§
impl Freeze for PnmSubtype
impl RefUnwindSafe for PnmSubtype
impl Send for PnmSubtype
impl Sync for PnmSubtype
impl Unpin for PnmSubtype
impl UnwindSafe for PnmSubtype
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more