pub fn validate_setup(msg: &Setup, sender: Role) -> Result<(), SetupError>Expand description
Validate a unified SETUP message from the endpoint named by sender.
Draft-19 merges the two setup messages into one and uses ALPN for version negotiation, so there are no versions to check and nothing in the message itself says which end sent it. That makes the sender an argument: Section 10.3.1.2 says the PATH option “MUST NOT be used by the server”, and with one message type for both directions the caller is the only thing that knows which direction this is.
§Errors
SetupError::WrongOptionRole if a server sent a PATH.