pub struct Mime(_);

Implementations

Create a Mime Type from a file extension.

File extensions: txt
mime types: text/plain

File extensions: html
mime types: text/html

File extensions: js
mime types: application/javascript

File extensions: css
mime types: text/css

File extensions: json
mime types: application/json

File extensions: csv
mime types: text/csv

File extensions: doc
mime types: application/msword

File extensions: docx
mime types: application/vnd.openxmlformats-officedocument.wordprocessingml.document

File extensions: pdf
mime types: application/pdf

File extensions: php
mime types: application/php

File extensions: rtf
mime types: application/rtf

File extensions: sh
mime types: application/x-sh

File extensions: vsd
mime types: application/vnd.visio

File extensions: xml
mime types: text/xml

File extensions: jpg
mime types: image/jpeg

File extensions: png
mime types: image/png

File extensions: gif
mime types: image/gif

File extensions: svg
mime types: image/svg+xml

File extensions: ico
mime types: image/vnd.microsoft.icon

File extensions: tiff
mime types: image/tiff

File extensions: webp
mime types: image/webp

File extensions: eot
mime types: application/vnd.ms-fontobject

File extensions: ttf
mime types: font/ttf

File extensions: woff
mime types: font/woff

File extensions: woff2
mime types: font/woff2

File extensions: avi
mime types: video/x-msvideo

File extensions: ogv
mime types: video/ogg

File extensions: webm
mime types: video/webm

File extensions: mp4
mime types: video/mp4

File extensions: aac
mime types: audio/aac

File extensions: mp3
mime types: audio/mpeg

File extensions: oga
mime types: audio/ogg

File extensions: wav
mime types: audio/wav

File extensions: weba
mime types: audio/webm

File extensions: rar
mime types: application/vnd.rar

File extensions: tar
mime types: application/x-tar

File extensions: zip
mime types: application/zip

File extensions: 7z
mime types: application/x-7z-compressed

File extensions: jar
mime types: application/java-archive

File extensions: bin
mime types: application/octet-stream

File extensions: wasm
mime types: application/wasm

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.