Encodes and attempts to write an `u16` value strictly as a 3-byte sequence into the given write. The first byte becomes the marker and the others will represent the data itself. Note, that this function will encode the given value in 3-byte sequence no matter what, even if the value can be represented using single byte as a positive fixnum. If you need to fit the given buffer efficiently use `w
(wr: &mut W, val: u16)
| 315 | /// This function will return `ValueWriteError` on any I/O error occurred while writing either the |
| 316 | /// marker or the data, except the EINTR, which is handled internally. |
| 317 | pub fn write_u16<W>(wr: &mut W, val: u16) -> Result<(), ValueWriteError> |
| 318 | where W: Write |
| 319 | { |
| 320 | try!(write_marker(wr, Marker::U16)); |
| 321 | write_data_u16(wr, val) |
| 322 | } |
| 323 | |
| 324 | /// Encodes and attempts to write an `u32` value strictly as a 5-byte sequence into the given write. |
| 325 | /// |