pub fn extract_header_request_id(
headers: &HeaderMap,
) -> Result<Option<&str>, Error>Expand description
Extract a request ID from request fields.
X-Request-Id takes precedence over Request-Id; the fallback is inspected
only when X-Request-Id is absent. If both are absent, this function returns
None. The selected value is returned unchanged, so an empty field produces
Some(""). A selected field that occurs more than once or is not text
produces an error that does not contain the field value. This function does
not generate, validate, authenticate, or log an identifier.