Enum image::pnm::PNMSubtype
source · [−]pub enum PNMSubtype {
Bitmap(SampleEncoding),
Graymap(SampleEncoding),
Pixmap(SampleEncoding),
ArbitraryMap,
}
Expand description
Denotes the category of the magic number
DEPRECATED: The name of this enum will be changed to PnmSubtype
.
TODO: rename to PnmSubtype
.
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
sourceimpl 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
sourceimpl Clone for PNMSubtype
impl Clone for PNMSubtype
sourcefn clone(&self) -> PNMSubtype
fn clone(&self) -> PNMSubtype
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PNMSubtype
impl Debug for PNMSubtype
sourceimpl PartialEq<PNMSubtype> for PNMSubtype
impl PartialEq<PNMSubtype> for PNMSubtype
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &PNMSubtype) -> bool
fn ne(&self, other: &PNMSubtype) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more