// Reads four bytes from the stream and returns them in read-order or an error.
Reads four bytes from the stream and returns them in read-order or an error.
Reads four bytes from the stream and returns them in read - order or an error .
fn read_quad_bytes(&mut self) -> io::Result<[u8; 4]> {
        let mut bytes = [0; 4];
        let buf = self.continguous_buf();
        if buf.len() >= 4 {
            bytes.copy_from_slice(&buf[..4]);
            self.consume(4);
        }
        else {
            for byte in bytes.iter_mut() {
                *byte = self.read_byte()?;
            }
        };
        Ok(bytes)
    }
fn read_quad_bytes ( & mut self ) -> io :: Result < [ u8 ; 4 ] > { let mut bytes = [ 0 ; 4 ] ; let buf = self . continguous_buf ( ) ; if buf . len ( ) >= 4 { bytes . copy_from_slice ( & buf [ .. 4 ] ) ; self . consume ( 4 ) ; } else { for byte in bytes . iter_mut ( ) { * byte = self . read_byte ( ) ? ; } } ; Ok ( bytes ) }
Reads four bytes from the stream and returns them in read-order or an error.
Reads four bytes from the stream and returns them in read - order or an error .
&mut self