trait HeaderReader: BufRead {
    // Provided methods
    fn read_magic_constant(&mut self) -> ImageResult<[u8; 2]> { ... }
    fn read_next_string(&mut self) -> ImageResult<String> { ... }
    fn read_next_u32(&mut self) -> ImageResult<u32> { ... }
    fn read_bitmap_header(
        &mut self,
        encoding: SampleEncoding
    ) -> ImageResult<BitmapHeader> { ... }
    fn read_graymap_header(
        &mut self,
        encoding: SampleEncoding
    ) -> ImageResult<GraymapHeader> { ... }
    fn read_pixmap_header(
        &mut self,
        encoding: SampleEncoding
    ) -> ImageResult<PixmapHeader> { ... }
    fn read_arbitrary_header(&mut self) -> ImageResult<ArbitraryHeader> { ... }
}

Provided Methods§

source

fn read_magic_constant(&mut self) -> ImageResult<[u8; 2]>

Reads the two magic constant bytes

source

fn read_next_string(&mut self) -> ImageResult<String>

Reads a string as well as a single whitespace after it, ignoring comments

source

fn read_next_u32(&mut self) -> ImageResult<u32>

source

fn read_bitmap_header( &mut self, encoding: SampleEncoding ) -> ImageResult<BitmapHeader>

source

fn read_graymap_header( &mut self, encoding: SampleEncoding ) -> ImageResult<GraymapHeader>

source

fn read_pixmap_header( &mut self, encoding: SampleEncoding ) -> ImageResult<PixmapHeader>

source

fn read_arbitrary_header(&mut self) -> ImageResult<ArbitraryHeader>

Implementors§

source§

impl<R> HeaderReader for Rwhere R: BufRead,