Struct PnmDecoder

pub struct PnmDecoder<R> { /* private fields */ }

PNM decoder

Implementations

impl<R: Read> PnmDecoder<R>

fn new(buffered_read: R) -> ImageResult<PnmDecoder<R>>

Create a new decoder that decodes from the stream read

fn header(&self) -> &PnmHeader

Get the header of the decoded image.

fn into_inner(self) -> (R, PnmHeader)

Extract the reader and header after an image has been read.

impl<R: Read> PnmDecoder<R>

fn subtype(&self) -> PnmSubtype

Get the pnm subtype, depending on the magic constant contained in the header

Trait Implementations

impl<R: Read> ImageDecoder for PnmDecoder<R>

fn dimensions(&self) -> (u32, u32)
fn color_type(&self) -> ColorType
fn original_color_type(&self) -> ExtendedColorType
fn read_image(self, buf: &mut [u8]) -> ImageResult<()>
fn read_image_boxed(self: Box<Self>, buf: &mut [u8]) -> ImageResult<()>

Auto Trait Implementations

impl<R> Freeze for PnmDecoder<R> where R: Freeze,

impl<R> RefUnwindSafe for PnmDecoder<R> where R: RefUnwindSafe,

impl<R> Send for PnmDecoder<R> where R: Send,

impl<R> Sync for PnmDecoder<R> where R: Sync,

impl<R> Unpin for PnmDecoder<R> where R: Unpin,

impl<R> UnsafeUnpin for PnmDecoder<R> where R: UnsafeUnpin,

impl<R> UnwindSafe for PnmDecoder<R> where R: UnwindSafe,

Blanket Implementations

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

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

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

impl<T> Borrow<T> for PnmDecoder<R> where T: ?Sized,

impl<T> BorrowMut<T> for PnmDecoder<R> where T: ?Sized,

impl<T> From<T> for PnmDecoder<R>

impl<T> IntoEither for PnmDecoder<R>

impl<T> Pointable for PnmDecoder<R>

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

impl<T, U> Into<U> for PnmDecoder<R> where U: From<T>,

impl<T, U> TryFrom<U> for PnmDecoder<R> where U: Into<T>,

impl<T, U> TryInto<U> for PnmDecoder<R> where U: TryFrom<T>,