pub struct MimeType {}

Implementations§

source§

impl MimeType

source

pub const APPLICATION_OCTET_STREAM: &'static str = "application/octet-stream"

source

pub const APPLICATION_ABIWORD: &'static str = "application/x-abiword"

source

pub const APPLICATION_VND_AMAZON_EBOOK: &'static str = "application/vnd.amazon.ebook"

source

pub const APPLICATION_X_BZIP: &'static str = "application/x-bzip"

source

pub const APPLICATION_X_BZIP2: &'static str = "application/x-bzip2"

source

pub const APPLICATION_X_CDF: &'static str = "application/x-cdf"

source

pub const APPLICATION_X_CSH: &'static str = "application/x-csh"

source

pub const APPLICATION_MSWORD: &'static str = "application/msword"

source

pub const APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENTS_WORDPROCESSINGIMPL_DOCUMENT: &'static str = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"

source

pub const APPLICATION_VND_MS_FONTOBJECT: &'static str = "application/vnd.ms-fontobject"

source

pub const APPLICATION_EPUB_ZIP: &'static str = "application/epub+zip"

source

pub const APPLICATION_GZIP: &'static str = "application/gzip"

source

pub const APPLICATION_JAVA_ARCHIVE: &'static str = "application/java-archive"

source

pub const APPLICATION_JSON: &'static str = "application/json"

source

pub const APPLICATION_JSONLD: &'static str = "application/ld+json"

source

pub const APPLICATION_VND_APPLE_INSTALLER_XML: &'static str = "application/vnd.apple.installer+xml"

source

pub const APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION: &'static str = "application/vnd.oasis.opendocument.presentation"

source

pub const APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET: &'static str = "application/vnd.oasis.opendocument.spreadsheet"

source

pub const APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT: &'static str = "application/vnd.oasis.opendocument.text"

source

pub const APPLICATION_OGG: &'static str = "application/ogg"

source

pub const APPLICATION_PDF: &'static str = "application/pdf"

source

pub const APPLICATION_X_HTTPD_PHP: &'static str = "application/x-httpd-php"

source

pub const APPLICATION_VND_MS_POWERPOINT: &'static str = "application/vnd.ms-powerpoint"

source

pub const APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION: &'static str = "application/vnd.openxmlformats-officedocument.presentationml.presentation"

source

pub const APPLICATION_VND_RAR: &'static str = "application/vnd.rar"

source

pub const APPLICATION_RTF: &'static str = "application/rtf"

source

pub const APPLICATION_X_SH: &'static str = "application/x-sh"

source

pub const APPLICATION_X_SHOCKWAVE_FLASH: &'static str = "application/x-shockwave-flash"

source

pub const APPLICATION_X_TAR: &'static str = "application/x-tar"

source

pub const APPLICATION_VND_VISIO: &'static str = "application/vnd.visio"

source

pub const APPLICATION_XHTML_XML: &'static str = "application/xhtml+xml"

source

pub const APPLICATION_VND_MS_EXCEL: &'static str = "application/vnd.ms-excel"

source

pub const APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET: &'static str = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

source

pub const APPLICATION_XML: &'static str = "application/xml"

source

pub const APPLICATION_VND_MOZILLA_XUL_XML: &'static str = "application/vnd.mozilla.xul+xml"

source

pub const APPLICATION_ZIP: &'static str = "application/zip"

source

pub const APPLICATION_X_7Z_COMPRESSED: &'static str = "application/x-7z-compressed"

source

pub const APPLICATION_X_X509_CA_CERT: &'static str = "application/x-x509-ca-cert"

source

pub const TEXT_PLAIN: &'static str = "text/plain"

source

pub const TEXT_CSS: &'static str = "text/css"

source

pub const TEXT_CSV: &'static str = "text/csv"

source

pub const TEXT_HTML: &'static str = "text/html"

source

pub const TEXT_JAVASCRIPT: &'static str = "text/javascript"

source

pub const TEXT_CALENDAR: &'static str = "text/calendar"

source

pub const IMAGE_APNG: &'static str = "image/apng"

source

pub const IMAGE_AVIF: &'static str = "image/avif"

source

pub const IMAGE_GIF: &'static str = "image/gif"

source

pub const IMAGE_JPEG: &'static str = "image/jpeg"

source

pub const IMAGE_PNG: &'static str = "image/png"

source

pub const IMAGE_SVG: &'static str = "image/svg+xml"

source

pub const IMAGE_WEBP: &'static str = "image/webp"

source

pub const IMAGE_BMP: &'static str = "image/bmp"

source

pub const IMAGE_ICO: &'static str = "image/x-icon"

source

pub const IMAGE_TIFF: &'static str = "image/tiff"

source

pub const AUDIO_AAC: &'static str = "audio/aac"

source

pub const AUDIO_FLAC: &'static str = "audio/flac"

source

pub const AUDIO_WAV: &'static str = "audio/wav"

source

pub const AUDIO_MP4: &'static str = "audio/mp4"

source

pub const AUDIO_OGG: &'static str = "audio/oga"

source

pub const AUDIO_MIDI: &'static str = "audio/midi"

source

pub const AUDIO_MPEG: &'static str = "audio/mpeg"

source

pub const AUDIO_OPUS: &'static str = "audio/opus"

source

pub const AUDIO_WEBM: &'static str = "audio/webm"

source

pub const VIDEO_3GP: &'static str = "video/3gpp"

source

pub const VIDEO_MPEG: &'static str = "video/mpeg"

source

pub const VIDEO_MP4: &'static str = "video/mp4"

source

pub const VIDEO_OGG: &'static str = "video/ogg"

source

pub const VIDEO_QUICKTIME: &'static str = "video/quicktime"

source

pub const VIDEO_WEBM: &'static str = "video/webm"

source

pub const VIDEO_X_MSVIDEO: &'static str = "video/x-msvideo"

source

pub const VIDEO_MP2T: &'static str = "video/mp2t"

source

pub const VIDEO_3GPP2: &'static str = "video/3gpp2"

source

pub const FONT_OTF: &'static str = "font/otf"

source

pub const FONT_TTF: &'static str = "font/ttf"

source

pub const FONT_WOFF: &'static str = "font/woff"

source

pub const FONT_WOFF2: &'static str = "font/woff2"

source

pub const TXT_SUFFIX: &'static str = ".txt"

source

pub const CSS_SUFFIX: &'static str = ".css"

source

pub const HTML_SUFFIX: &'static str = ".html"

source

pub const HTM_SUFFIX: &'static str = ".htm"

source

pub const JS_SUFFIX: &'static str = ".js"

source

pub const MJS_SUFFIX: &'static str = ".mjs"

source

pub const APNG_SUFFIX: &'static str = ".apng"

source

pub const AVIF_SUFFIX: &'static str = ".avif"

source

pub const GIF_SUFFIX: &'static str = ".gif"

source

pub const JPG_SUFFIX: &'static str = ".jpg"

source

pub const JPEG_SUFFIX: &'static str = ".jpeg"

source

pub const JPE_SUFFIX: &'static str = ".jpe"

source

pub const JIF_SUFFIX: &'static str = ".jif"

source

pub const JFIF_SUFFIX: &'static str = ".jfif"

source

pub const PNG_SUFFIX: &'static str = ".png"

source

pub const SVG_SUFFIX: &'static str = ".svg"

source

pub const WEBP_SUFFIX: &'static str = ".webp"

source

pub const BMP_SUFFIX: &'static str = ".bmp"

source

pub const ICO_SUFFIX: &'static str = ".ico"

source

pub const CUR_SUFFIX: &'static str = ".cur"

source

pub const TIF_SUFFIX: &'static str = ".tif"

source

pub const TIFF_SUFFIX: &'static str = ".tiff"

source

pub const AAC_SUFFIX: &'static str = ".aac"

source

pub const FLAC_SUFFIX: &'static str = ".flac"

source

pub const WAV_SUFFIX: &'static str = ".wav"

source

pub const M4A_SUFFIX: &'static str = ".m4a"

source

pub const N3GP_SUFFIX: &'static str = ".3gp"

source

pub const MPG_SUFFIX: &'static str = ".mpg"

source

pub const MPEG_SUFFIX: &'static str = ".mpeg"

source

pub const MP4_SUFFIX: &'static str = ".mp4"

source

pub const M4V_SUFFIX: &'static str = ".m4v"

source

pub const M4P_SUFFIX: &'static str = ".m4p"

source

pub const OGA_SUFFIX: &'static str = ".oga"

source

pub const OGG_SUFFIX: &'static str = ".ogg"

source

pub const OGV_SUFFIX: &'static str = ".ogv"

source

pub const MOV_SUFFIX: &'static str = ".mov"

source

pub const WEBM_SUFFIX: &'static str = ".webm"

source

pub const ABW_SUFFIX: &'static str = ".abw"

source

pub const AVI_SUFFIX: &'static str = ".avi"

source

pub const AZV_SUFFIX: &'static str = ".azw"

source

pub const BIN_SUFFIX: &'static str = ".bin"

source

pub const BZ_SUFFIX: &'static str = ".bz"

source

pub const BZ2_SUFFIX: &'static str = ".bz2"

source

pub const CDA_SUFFIX: &'static str = ".cda"

source

pub const CSH_SUFFIX: &'static str = ".csh"

source

pub const CSV_SUFFIX: &'static str = ".csv"

source

pub const DOC_SUFFIX: &'static str = ".doc"

source

pub const DOCX_SUFFIX: &'static str = ".docx"

source

pub const EOT_SUFFIX: &'static str = ".eot"

source

pub const EPUB_SUFFIX: &'static str = ".epub"

source

pub const GZ_SUFFIX: &'static str = ".gz"

source

pub const ICS_SUFFIX: &'static str = ".ics"

source

pub const JAR_SUFFIX: &'static str = ".jar"

source

pub const JSON_SUFFIX: &'static str = ".json"

source

pub const JSONLD_SUFFIX: &'static str = ".jsonld"

source

pub const MIDI_SUFFIX: &'static str = ".midi"

source

pub const MID_SUFFIX: &'static str = ".mid"

source

pub const MP3_SUFFIX: &'static str = ".mp3"

source

pub const MPKG_SUFFIX: &'static str = ".mpkg"

source

pub const ODP_SUFFIX: &'static str = ".odp"

source

pub const ODS_SUFFIX: &'static str = ".ods"

source

pub const ODT_SUFFIX: &'static str = ".odt"

source

pub const OGX_SUFFIX: &'static str = ".ogx"

source

pub const OPUS_SUFFIX: &'static str = ".opus"

source

pub const OTF_SUFFIX: &'static str = ".otf"

source

pub const PDF_SUFFIX: &'static str = ".pdf"

source

pub const PHP_SUFFIX: &'static str = ".php"

source

pub const PPT_SUFFIX: &'static str = ".ppt"

source

pub const PPTX_SUFFIX: &'static str = ".pptx"

source

pub const RAR_SUFFIX: &'static str = ".rar"

source

pub const RTF_SUFFIX: &'static str = ".rtf"

source

pub const SH_SUFFIX: &'static str = ".sh"

source

pub const SWF_SUFFIX: &'static str = ".swf"

source

pub const TAR_SUFFIX: &'static str = ".tar"

source

pub const TS_SUFFIX: &'static str = ".ts"

source

pub const TTF_SUFFIX: &'static str = ".ttf"

source

pub const VSD_SUFFIX: &'static str = ".vsd"

source

pub const WEBA_SUFFIX: &'static str = ".weba"

source

pub const WOFF_SUFFIX: &'static str = ".woff"

source

pub const WOFF2_SUFFIX: &'static str = ".woff2"

source

pub const XHTML_SUFFIX: &'static str = ".xhtml"

source

pub const XLS_SUFFIX: &'static str = ".xls"

source

pub const XLSX_SUFFIX: &'static str = ".xlsx"

source

pub const XML_SUFFIX: &'static str = ".xml"

source

pub const XUL_SUFFIX: &'static str = ".xul"

source

pub const ZIP_SUFFIX: &'static str = ".zip"

source

pub const N7Z_SUFFIX: &'static str = ".7z"

source

pub const N3G2_SUFFIX: &'static str = ".3g2"

source

pub const CRT_SUFFIX: &'static str = ".crt"

source

pub fn detect_mime_type(request_uri: &str) -> String

source

pub fn get_extension_from_filename(filename: &str) -> Option<&str>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.