Crate mime_guess [] [src]

Guessing of MIME types by file extension.

Uses a static list of file-extension : MIME type mappings.

Structs

Mime

Mime, or Media Type. Encapsulates common registers types.

Functions

get_extensions

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

get_mime_extensions

Get a list of known extensions for a given Mime.

get_mime_extensions_str

Get a list of known extensions for a MIME type string.

get_mime_type

Get the MIME type associated with a file extension.

get_mime_type_opt

Get the MIME type associated with a file extension.

get_mime_type_str

Get the MIME type string associated with a file extension. Case-insensitive.

guess_mime_type

Guess the MIME type of path by its extension (as defined by Path::extension()).

guess_mime_type_opt

Guess the MIME type of path by its extension (as defined by Path::extension()).

octet_stream

Get the MIME type for application/octet-stream (generic binary stream)