Encodes and attempts to write a bool value into the given write. According to the MessagePack specification, an encoded boolean value is represented as a single byte. # Errors This function will return `FixedValueWriteError` on any I/O error occurred while writing the boolean marker.
(wr: &mut W, val: bool)
| 169 | /// This function will return `FixedValueWriteError` on any I/O error occurred while writing the |
| 170 | /// boolean marker. |
| 171 | pub fn write_bool<W>(wr: &mut W, val: bool) -> Result<(), FixedValueWriteError> |
| 172 | where W: Write |
| 173 | { |
| 174 | match val { |
| 175 | true => write_fixval(wr, Marker::True), |
| 176 | false => write_fixval(wr, Marker::False) |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | /// Encodes and attempts to write an unsigned small integer value as a positive fixint into the |
| 181 | /// given write. |