Skip to main content

decode_bool

Function decode_bool 

Source
pub fn decode_bool(data: &[u8]) -> Result<bool, DriverError>
Expand description

Decode a boolean from binary format (1 byte: 0x00 = false, 0x01 = true).

§Errors

Returns DriverError::Protocol if the data is not exactly 1 byte.