decode

Function decode 

pub(super) const fn decode<'a, P: PropertyConstraint>(
    r: &mut Reader<'a>,
) -> Result<(ReasonCode, &'a Properties<P>), DecodeError>
Expand description

Decodes a “reason code plus optional properties” tail from the reader.

An empty reader yields ReasonCode::Success with empty properties. The caller is responsible for rejecting any trailing bytes via Reader::finish.

§Errors

Returns DecodeError if the reason code is invalid or the properties are malformed or disallowed.