Skip to main content

check_no_duplicate_parameters_sent

Function check_no_duplicate_parameters_sent 

Source
fn check_no_duplicate_parameters_sent(
    parameters: &[KeyValuePair],
) -> Result<(), CodecError>
Expand description

Refuse a parameter list a sender may not put on the wire.

Section 9.2: “Senders MUST NOT repeat the same parameter type in a message unless the parameter definition explicitly allows multiple instances of that type to be sent in a single message.”

The sender’s half names no exception for types the sender does not recognise, so every repeat is refused here except REPEATABLE_PARAMETER. A caller holding a parameter this codec has never heard of still may not send it twice: it knows the type it is sending, and the rule is about that knowledge, not this codec’s.