encoded_len

Function encoded_len 

pub(super) const fn encoded_len<P: PropertyConstraint>(
    reason_code: ReasonCode,
    properties: &Properties<P>,
) -> usize
Expand description

Encoded size of a “reason code plus optional properties” tail, in bytes.

MQTT v5 lets the tail be omitted entirely when the reason code is ReasonCode::Success and there are no properties, and lets the property length be omitted when the properties are empty.