(self, out: &mut Vec<u8>, offset_by_min: bool)
| 30 | } |
| 31 | |
| 32 | fn write(self, out: &mut Vec<u8>, offset_by_min: bool) { |
| 33 | // Encoded in such a way such that 0 is `Self::_256` and higher numbers are smaller packing. |
| 34 | // Also makes `Self::_256` with offset_by_min = true is unrepresentable. |
| 35 | out.push(self as u8 * 2 - offset_by_min as u8); |
| 36 | } |
| 37 | |
| 38 | fn read(input: &mut &[u8]) -> Result<(Self, bool)> { |
| 39 | let v = consume_byte(input)?; |
no outgoing calls
no test coverage detected