Struct GraymapHeader

pub struct GraymapHeader { pub encoding: SampleEncoding, pub height: u32, pub width: u32, pub maxwhite: u32 }

Header produced by a pgm file ("Portable Gray Map")

Fields

encoding: SampleEncoding

Binary or Ascii encoded file

height: u32

Height of the image file

width: u32

Width of the image file

maxwhite: u32

Maximum sample value within the image

Trait Implementations

impl Clone for GraymapHeader

fn clone(&self) -> GraymapHeader

impl Copy for GraymapHeader

impl Debug for GraymapHeader

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

Auto Trait Implementations

impl Freeze for GraymapHeader

impl RefUnwindSafe for GraymapHeader

impl Send for GraymapHeader

impl Sync for GraymapHeader

impl Unpin for GraymapHeader

impl UnsafeUnpin for GraymapHeader

impl UnwindSafe for GraymapHeader

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for GraymapHeader where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for GraymapHeader where ST: ?Sized, DT: ?Sized,

impl<T> Any for GraymapHeader where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for GraymapHeader where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for GraymapHeader where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for GraymapHeader where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for GraymapHeader

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for GraymapHeader

impl<T> Pointable for GraymapHeader

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for GraymapHeader where T: ?Sized,

impl<T> ToOwned for GraymapHeader where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for GraymapHeader where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for GraymapHeader where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for GraymapHeader where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>