Enum PnmSubtype
pub enum PnmSubtype
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
impl PnmSubtype
fn magic_constant(self) -> &'static [u8; 2]Get the two magic constant bytes corresponding to this format subtype.
fn sample_encoding(self) -> SampleEncodingWhether samples are stored as binary or as decimal ascii
Trait Implementations
impl Clone for PnmSubtype
fn clone(&self) -> PnmSubtype
impl Copy for PnmSubtype
impl Debug for PnmSubtype
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for PnmSubtype
impl PartialEq for PnmSubtype
fn eq(&self, other: &PnmSubtype) -> bool
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 UnsafeUnpin for PnmSubtype
impl UnwindSafe for PnmSubtype
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for PnmSubtype
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for PnmSubtype
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for PnmSubtype
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for PnmSubtype
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for PnmSubtype
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for PnmSubtype
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for PnmSubtype
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for PnmSubtype
impl<T> Pointable for PnmSubtype
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for PnmSubtype
where
T: ?Sized,
impl<T> ToOwned for PnmSubtype
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for PnmSubtype
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for PnmSubtype
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for PnmSubtype
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>