Skip to main content

mime_matches

Function mime_matches 

Source
fn mime_matches(pattern: &str, mime: &str) -> bool
Expand description

Whether a MIME type matches one accept pattern.

Patterns are exact (image/png) or a wildcarded subtype (image/*), and */* accepts everything. Parameters after a ; are ignored, because text/plain; charset=utf-8 is a text/plain.