pub fn read_u32(&mut self) -> u32 {
        self.flush_bit();
        assert!(self.rpos + 4 <= self.data.len());
        let range = self.rpos..self.rpos + 4;
        self.rpos += 4;
        BigEndian::read_u32(&self.data[range])
    }
/// Read a four-bytes long value. The program crash if not enough bytes are available
///
/// #Example
///
/// ```
/// #  use databuffer::*;
/// let mut buffer = DataBuffer::from_bytes(&vec![0x0, 0x0, 0x0, 0x1]);
/// let value = buffer.read_u32(); // Value contains 1
/// ```
Read a four-bytes long value. The program crash if not enough bytes are available
Read a four - bytes long value . The program crash if not enough bytes are available
pub fn read_u32(&mut self) -> u32 {
        self.flush_bit();
        assert!(self.rpos + 4 <= self.data.len());
        let range = self.rpos..self.rpos + 4;
        self.rpos += 4;
        BigEndian::read_u32(&self.data[range])
    }
pub fn read_u32 ( & mut self ) -> u32 { self . flush_bit ( ) ; assert ! ( self rpos 4 self data len ( ) ) ; let range = self . rpos .. self . rpos + 4 ; self . rpos += 4 ; BigEndian :: read_u32 ( & self . data [ range ] ) }
Read a four-bytes long value.
Read a four - bytes long value .
&mut self
example
None
use databuffer::*;
let mut buffer = DataBuffer::from_bytes(&vec![0x0, 0x0, 0x0, 0x1]);
let value = buffer.read_u32(); // Value contains 1
```
let mut buffer = DataBuffer :: from_bytes ( &vec! [ 0x0 0x0 0x0 0x1 ] ) ; let value = buffer . read_u32 () ; // Value contains 1 ` ` `