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<PnmSubtype> for PnmSubtype
impl PartialEq<PnmSubtype> 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 StructuralEq for PnmSubtype
impl StructuralPartialEq for PnmSubtype
Auto Trait Implementations§
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