Trait image::codecs::pnm::decoder::Sample

source ·
trait Sample {
    type Representation;

    // Required methods
    fn from_bytes(
        bytes: &[u8],
        row_size: usize,
        output_buf: &mut [u8],
    ) -> ImageResult<()>;
    fn from_ascii(
        reader: &mut dyn Read,
        output_buf: &mut [u8],
    ) -> ImageResult<()>;

    // Provided methods
    fn sample_size() -> u32 { ... }
    fn bytelen(width: u32, height: u32, samples: u32) -> ImageResult<usize> { ... }
}

Required Associated Types§

Required Methods§

source

fn from_bytes( bytes: &[u8], row_size: usize, output_buf: &mut [u8], ) -> ImageResult<()>

source

fn from_ascii(reader: &mut dyn Read, output_buf: &mut [u8]) -> ImageResult<()>

Provided Methods§

source

fn sample_size() -> u32

Representation size in bytes

source

fn bytelen(width: u32, height: u32, samples: u32) -> ImageResult<usize>

Object Safety§

This trait is not object safe.

Implementors§