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§
sourcefn read_magic_constant(&mut self) -> ImageResult<[u8; 2]>
fn read_magic_constant(&mut self) -> ImageResult<[u8; 2]>
Reads the two magic constant bytes
sourcefn read_next_string(&mut self) -> ImageResult<String>
fn read_next_string(&mut self) -> ImageResult<String>
Reads a string as well as a single whitespace after it, ignoring comments