Enum fire_http_representation::header::Mime [−][src]
#[non_exhaustive] pub enum Mime {}Show variants
Text, Html, Js, Css, Json, Csv, Doc, Docx, Pdf, Php, Rtf, Sh, Vsd, Xml, Jpg, Png, Gif, Svg, Ico, Tiff, Webp, Eot, Ttf, Woff, Woff2, Avi, Ogv, Webm, Mp4, Aac, Mp3, Oga, Wav, Weba, Rar, Tar, Zip, _7Zip, Jar, Binary, Wasm,
Expand description
A list of the most important mime types.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
File extension: txt
, mime type: text/plain
File extension: html
, mime type: text/html
File extension: js
, mime type: application/javascript
File extension: css
, mime type: text/css
File extension: json
, mime type: application/json
File extension: csv
, mime type: text/csv
File extension: doc
, mime type: application/msword
File extension: docx
, mime type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
File extension: pdf
, mime type: application/pdf
File extension: php
, mime type: application/php
File extension: rtf
, mime type: application/rtf
File extension: sh
, mime type: application/x-sh
File extension: vsd
, mime type: application/vnd.visio
File extension: xml
, mime type: text/xml
File extension: jpg
, mime type: image/jpeg
File extension: png
, mime type: image/png
File extension: gif
, mime type: image/gif
File extension: svg
, mime type: image/svg+xml
File extension: ico
, mime type: image/vnd.microsoft.icon
File extension: tiff
, mime type: image/tiff
File extension: webp
, mime type: image/webp
File extension: eot
, mime type: application/vnd.ms-fontobject
File extension: ttf
, mime type: font/ttf
File extension: woff
, mime type: font/woff
File extension: woff2
, mime type: font/woff2
File extension: avi
, mime type: video/x-msvideo
File extension: ogv
, mime type: video/ogg
File extension: webm
, mime type: video/webm
File extension: mp4
, mime type: video/mp4
File extension: aac
, mime type: audio/aac
File extension: mp3
, mime type: audio/mpeg
File extension: oga
, mime type: audio/ogg
File extension: wav
, mime type: audio/wav
File extension: weba
, mime type: audio/webm
File extension: rar
, mime type: application/vnd.rar
File extension: tar
, mime type: application/x-tar
File extension: zip
, mime type: application/zip
File extension: 7z
, mime type: application/x-7z-compressed
File extension: jar
, mime type: application/java-archive
File extension: bin
, mime type: application/octet-stream
File extension: wasm
, mime type: application/wasm
Implementations
impl Mime
[src]
impl Mime
[src]pub fn try_from_ext(value: &str) -> Option<Self>
[src]
pub fn try_from_ext(value: &str) -> Option<Self>
[src]Tries to return a mime type from a file extension.
pub fn from_ext(value: &str) -> Self
[src]
pub fn from_ext(value: &str) -> Self
[src]Returns a mime type to a given file extension,
if the file extension is unknown Mime::Binary
is returned.
pub fn try_from_mime(value: &str) -> Option<Self>
[src]
pub fn try_from_mime(value: &str) -> Option<Self>
[src]Tries to return a mime type from a mime type string.
Trait Implementations
impl Copy for Mime
[src]
impl Eq for Mime
[src]
impl StructuralEq for Mime
[src]
impl StructuralPartialEq for Mime
[src]
Auto Trait Implementations
impl RefUnwindSafe for Mime
impl Send for Mime
impl Sync for Mime
impl Unpin for Mime
impl UnwindSafe for Mime
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more