[−][src]Trait claxon::input::ReadBytes
Provides convenience methods to make input less cumbersome.
Required methods
fn read_u8(&mut self) -> Result<u8>
Reads a single byte, failing on EOF.
fn read_u8_or_eof(&mut self) -> Result<Option<u8>>
Reads a single byte, not failing on EOF.
fn read_into(&mut self, buffer: &mut [u8]) -> Result<()>
Reads until the provided buffer is full.
fn skip(&mut self, amount: u32) -> Result<()>
Skips over the specified number of bytes.
For a buffered reader, this can help a lot by just bumping a pointer.
Provided methods
fn read_be_u16(&mut self) -> Result<u16>
Reads two bytes and interprets them as a big-endian 16-bit unsigned integer.
fn read_be_u16_or_eof(&mut self) -> Result<Option<u16>>
Reads two bytes and interprets them as a big-endian 16-bit unsigned integer.
fn read_be_u24(&mut self) -> Result<u32>
Reads three bytes and interprets them as a big-endian 24-bit unsigned integer.
fn read_be_u32(&mut self) -> Result<u32>
Reads four bytes and interprets them as a big-endian 32-bit unsigned integer.
fn read_le_u32(&mut self) -> Result<u32>
Reads four bytes and interprets them as a little-endian 32-bit unsigned integer.