pub fn parse_accept_language(header: Option<&str>) -> Option<String>Expand description
Parse an Accept-Language header value, returning the first
language tag that passes the validator. Pulled out as a free
function so the negotiation policy is unit-testable without a
Request.
Returns:
Some(tag)when the header contains at least one valid tag. Validation: ASCII letters / digits / hyphens only, length 1..=[MAX_TAG_LEN].Nonewhen the header is missing, empty after trimming, or contains no valid tag.