[][src]Struct image::ppm::PPMEncoder

pub struct PPMEncoder<'a, W: 'a> { /* fields omitted */ }

A representation of a PPM encoder.

Methods

impl<'a, W: Write> PPMEncoder<'a, W>[src]

pub fn new(w: &mut W) -> PPMEncoder<W>[src]

Create a new PPMEncoder from the Writer w.

pub fn encode(
    &mut self,
    im: &[u8],
    width: u32,
    height: u32,
    color: ColorType
) -> Result<()>
[src]

Encode the buffer im as a PPM image. width and height are the dimensions of the buffer. color is the buffers ColorType.

Auto Trait Implementations

impl<'a, W> Send for PPMEncoder<'a, W> where
    W: Send

impl<'a, W> Sync for PPMEncoder<'a, W> where
    W: Sync

impl<'a, W> Unpin for PPMEncoder<'a, W>

impl<'a, W> !UnwindSafe for PPMEncoder<'a, W>

impl<'a, W> RefUnwindSafe for PPMEncoder<'a, W> where
    W: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]