Type Alias image::codecs::pnm::PnmSubtype

source ·
pub type PnmSubtype = PNMSubtype;
Expand description

PNM Subtype

An alias of PNMSubtype.

TODO: remove when [DXTVariant] is renamed.

Aliased Type§

enum PnmSubtype {
    Bitmap(SampleEncoding),
    Graymap(SampleEncoding),
    Pixmap(SampleEncoding),
    ArbitraryMap,
}

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

source

pub fn magic_constant(self) -> &'static [u8; 2]

Get the two magic constant bytes corresponding to this format subtype.

source

pub fn sample_encoding(self) -> SampleEncoding

Whether samples are stored as binary or as decimal ascii

Trait Implementations

source§

impl StructuralEq for PNMSubtype

source§

impl Eq for PNMSubtype

source§

impl PartialEq for PNMSubtype

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Clone for PNMSubtype

source§

fn clone(&self) -> PNMSubtype

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl StructuralPartialEq for PNMSubtype

source§

impl Copy for PNMSubtype

source§

impl Debug for PNMSubtype

source§

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

Formats the value using the given formatter. Read more