Skip to main content

encode_parameters

Function encode_parameters 

Source
fn encode_parameters(
    parameters: &[KeyValuePair],
    buf: &mut impl BufMut,
) -> Result<(), CodecError>
Expand description

Encode a version-specific parameter list, refusing every list decode_parameters would refuse.

The duplicate rule the sender is held to is its own — it exempts a parameter type rather than a namespace, and the exempt type has the same code point in each, which is why one call covers both. The three value rules are the reader’s, applied here for the reason each of them states a close: a value that is not what its Type defines is one the receiver must close the session over, so writing it is not a way to send it. The sender’s first sign of trouble would be the session going.