pub fn parse_four_byte_int<R: io::Read>(reader: &mut R) -> Result<Self, Error> {
    let mut buffer = [0; 4];
    reader.read_exact(&mut buffer)?;
    Ok(Self::FourByteInteger(u32::from_be_bytes(buffer)))
  }
/// Reads four bytes from the reader and attempts to convert the bytes to DataType::FourByteInteger (u32).
///
/// [1.5.3 Four Byte Integer](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901009)
///
/// Four Byte Integer data values are 32-bit unsigned integers in big-endian
/// order: the high order byte precedes the successively lower order bytes.
/// This means that a 32-bit word is presented on the network as Most
/// Significant Byte (MSB), followed by the next most Significant Byte (MSB),
/// followed by the next most Significant Byte (MSB), followed by Least
/// Significant Byte (LSB).
///
/// # Examples
///
/// ```rust
/// use mqtt_packet::DataType;
/// use std::io;
///
/// let data: Vec<u8> = vec![0x01, 0x02, 0x03, 0x04, 0x05];
/// let mut reader = io::BufReader::new(&data[..]);
/// let four = DataType::parse_four_byte_int(&mut reader).unwrap();
/// assert_eq!(four, DataType::FourByteInteger(16909060));
/// ```
Reads four bytes from the reader and attempts to convert the bytes to DataType::FourByteInteger (u32).

Four Byte Integer data values are 32-bit unsigned integers in big-endian
order: the high order byte precedes the successively lower order bytes.
This means that a 32-bit word is presented on the network as Most
Significant Byte (MSB), followed by the next most Significant Byte (MSB),
followed by the next most Significant Byte (MSB), followed by Least
Significant Byte (LSB).
Reads four bytes from the reader and attempts to convert the bytes to DataType :: FourByteInteger ( u32 ) . Four Byte Integer data values are 32 - bit unsigned integers in big - endian order : the high order byte precedes the successively lower order bytes . This means that a 32 - bit word is presented on the network as Most Significant Byte ( MSB ) followed by the next most Significant Byte ( MSB ) followed by the next most Significant Byte ( MSB ) followed by Least Significant Byte ( LSB ) .
pub fn parse_four_byte_int<R: io::Read>(reader: &mut R) -> Result<Self, Error> {
    let mut buffer = [0; 4];
    reader.read_exact(&mut buffer)?;
    Ok(Self::FourByteInteger(u32::from_be_bytes(buffer)))
  }
pub fn parse_four_byte_int < R : io :: Read > ( reader : & mut R ) -> Result < Self , Error > { let mut buffer = [ 0 ; 4 ] ; reader . read_exact ( & mut buffer ) ? ; Ok ( Self :: FourByteInteger ( u32 :: from_be_bytes ( buffer ) ) ) }
Reads four bytes from the reader and attempts to convert the bytes to DataType::FourByteInteger (u32).
Reads four bytes from the reader and attempts to convert the bytes to DataType :: FourByteInteger ( u32 ) .
reader
&mut R
reader
&mut R
examples
```rust
use mqtt_packet::DataType;
use std::io.


` ` ` rust use mqtt_packet :: DataType ; use std :: io .