* Try to read binary uint8, and then advance reader. */
| 109 | * Try to read binary uint8, and then advance reader. |
| 110 | */ |
| 111 | [[nodiscard]] std::optional<uint8_t> TryReadUint8() |
| 112 | { |
| 113 | auto value = this->PeekUint8(); |
| 114 | if (value.has_value()) this->SkipUint8(); |
| 115 | return value; |
| 116 | } |
| 117 | /** |
| 118 | * Read binary uint8, and advance reader. |
| 119 | * @param def Default value to return, if not enough data. |
no test coverage detected