mime_guess

Function get_extensions

Source
pub fn get_extensions(
    toplevel: &str,
    sublevel: &str,
) -> Option<&'static [&'static str]>
Expand description

Get the extensions for a given top-level and sub-level of a MIME type ({toplevel}/{sublevel}).

Returns None if toplevel or sublevel are unknown.

ยงWildcards

If the top-level of the MIME type is a wildcard (*), returns all extensions.

If the sub-level of the MIME type is a wildcard, returns all extensions for the top-level.