Skip to main content

end_reason_to_http_status

Function end_reason_to_http_status 

Source
fn end_reason_to_http_status(end_reason: EndReason) -> StatusCode
Expand description

Return the appropriate HTTP status code for a remote END reason.

Return None if the END reason is unrecognized and we should use the ErrorKind

(We could use the ErrorKind unconditionally, but the mapping from END reason to ErrorKind is given in the spec, so we try to obey it.)