Skip to main content

get_extensions

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 media type ({toplevel}/{sublevel}).

Returns None if toplevel or sublevel are unknown.

ยงWildcards

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

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