pub fn write_u16(&mut self, val: u16) {
        let mut buf = [0; 2];
        BigEndian::write_u16(&mut buf, val);
        self.write_bytes(&buf);
    }
/// Append a word (16 bits value) to the buffer
///
/// #Example
///
/// ```
/// #  use databuffer::*;
/// let mut buffer = DataBuffer::new();
/// buffer.write_u16(1) // buffer contains [0x00, 0x1] if little endian
/// ```
Append a word (16 bits value) to the buffer
Append a word ( 16 bits value ) to the buffer
pub fn write_u16(&mut self, val: u16) {
        let mut buf = [0; 2];
        BigEndian::write_u16(&mut buf, val);
        self.write_bytes(&buf);
    }
pub fn write_u16 ( & mut self , val : u16 ) { let mut buf = [ 0 ; 2 ] ; BigEndian :: write_u16 ( & mut buf , val ) ; self . write_bytes ( & buf ) ; }
Append a word (16 bits value) to the buffer
Append a word ( 16 bits value ) to the buffer
&mut self
val
u16
example
None
use databuffer::*;
let mut buffer = DataBuffer::new();
buffer.write_u16(1) // buffer contains [0x00, 0x1] if little endian
```
let mut buffer = DataBuffer :: new () ; buffer . write_u16 ( 1 ) // buffer contains [ 0x00 0x1 ] if little endian ` ` `