Function sage_mqtt::codec::read_bool [−][src]
pub async fn read_bool<R: AsyncRead + Unpin>(reader: &mut R) -> SageResult<bool>
Expand description
Read the given reader
for a boolean value.
MQTT5 specifications do not define an actual boolean type but expresses it
with a byte being 0x00
for false
or 0x01
for false
. Other values are
considered incorrect.
In case of success, returns an bool