Skip to main content

Module mime

Module mime 

Source
Expand description

MIME primitives reused from the RustUse web set.

Structs§

MimeType
A lightweight MIME type split into type, subtype, and optional suffix.

Functions§

extension_from_mime
Returns a common extension for the requested MIME type.
is_css_mime
Returns true when the MIME type is CSS.
is_html_mime
Returns true when the MIME type is HTML.
is_image_mime
Returns true when the MIME type is image-based.
is_json_mime
Returns true when the MIME type is JSON or a +json subtype.
is_text_mime
Returns true when the MIME type is text-based.
is_xml_mime
Returns true when the MIME type is XML or a +xml subtype.
looks_like_mime
Returns true when the input parses as a MIME type.
mime_from_extension
Returns a common MIME type for the requested extension.
parse_mime
Parses a MIME type essence into simple parts.