Reads the next 32-bit unsigned integer, advancing the cursor by four bytes.
(&mut self)
| 310 | /// Reads the next 32-bit unsigned integer, advancing the cursor by four |
| 311 | /// bytes. |
| 312 | pub fn read_u32(&mut self) -> Result<u32, io::Error> { |
| 313 | if self.buf.len() < 4 { |
| 314 | return Err(input_err("not enough buffer for an Int32")); |
| 315 | } |
| 316 | let val = NetworkEndian::read_u32(self.buf); |
| 317 | self.advance(4); |
| 318 | Ok(val) |
| 319 | } |
| 320 | |
| 321 | /// Reads the next 16-bit format code, advancing the cursor by two bytes. |
| 322 | pub fn read_format(&mut self) -> Result<Format, io::Error> { |
no test coverage detected