Encodes and attempts to write the most efficient binary implementation to the given `Write`. # Errors This function will return `ValueWriteError` on any I/O error occurred while writing either the marker or the data, except the EINTR, which is handled internally. TODO: Docs, range check, example, visibility.
(wr: &mut W, data: &[u8])
| 686 | /// marker or the data, except the EINTR, which is handled internally. |
| 687 | // TODO: Docs, range check, example, visibility. |
| 688 | pub fn write_bin<W>(wr: &mut W, data: &[u8]) -> Result<(), ValueWriteError> |
| 689 | where W: Write |
| 690 | { |
| 691 | try!(write_bin_len(wr, data.len() as u32)); |
| 692 | wr.write_all(data).map_err(|err| ValueWriteError::InvalidDataWrite(WriteError(err))) |
| 693 | } |
| 694 | |
| 695 | /// Encodes and attempts to write the most efficient array length implementation to the given write, |
| 696 | /// returning the marker used. |
no test coverage detected