pub fn read_u8(&mut self) -> u8 {
        self.flush_bit();
        assert!(self.rpos < self.data.len());
        let pos = self.rpos;
        self.rpos += 1;
        self.data[pos]
    }
/// Read one byte. The program crash if not enough bytes are available
///
/// #Example
///
/// ```
/// #  use databuffer::*;
/// let mut buffer = DataBuffer::from_bytes(&vec![0x1]);
/// let value = buffer.read_u8(); //Value contains 1
/// ```
Read one byte. The program crash if not enough bytes are available
Read one byte . The program crash if not enough bytes are available
pub fn read_u8(&mut self) -> u8 {
        self.flush_bit();
        assert!(self.rpos < self.data.len());
        let pos = self.rpos;
        self.rpos += 1;
        self.data[pos]
    }
pub fn read_u8 ( & mut self ) -> u8 { self . flush_bit ( ) ; assert ! ( self rpos self data len ( ) ) ; let pos = self . rpos ; self . rpos += 1 ; self . data [ pos ] }
Read one byte.
Read one byte .
&mut self
example
None
use databuffer::*;
let mut buffer = DataBuffer::from_bytes(&vec![0x1]);
let value = buffer.read_u8(); //Value contains 1
```
let mut buffer = DataBuffer :: from_bytes ( &vec! [ 0x1 ] ) ; let value = buffer . read_u8 () ; // Value contains 1 ` ` `