Skip to main content

malformed

Function malformed 

Source
fn malformed(key: u64, detail: &'static str) -> CodecError
Expand description

Report a Token that cannot be decoded under the rule its draft states.

Drafts 15 through 19 give this rule its own sentence — “If the Token structure cannot be decoded, the receiver MUST close the Session with KEY_VALUE_FORMATTING_ERROR”. Drafts 12, 13 and 14 state it in those same words and name the code in prose instead, as Key-Value Formatting error — draft-14 doing so even though its own registry and its general Key-Value-Pair rule already spell KEY_VALUE_FORMATTING_ERROR. Draft-11 has no sentence of its own and reaches the same answer through the general one in Section 1.3.2, which covers any Type whose value does not match the serialization that Type defines.