Skip to main content

select_mime_type

Function select_mime_type 

Source
pub fn select_mime_type(
    available: Vec<String>,
    requested: MimeType<'_>,
) -> Option<String>
Expand description

Selects the best MIME type from available according to requested.

When text types are available, these will generally be preferred. See MimeType for details. Returns the chosen type, or None if none of the available types satisfy the request.