pub struct MimeType {}
Implementations§
Source§impl MimeType
impl MimeType
pub const APPLICATION_OCTET_STREAM: &'static str = "application/octet-stream"
pub const APPLICATION_ABIWORD: &'static str = "application/x-abiword"
pub const APPLICATION_VND_AMAZON_EBOOK: &'static str = "application/vnd.amazon.ebook"
pub const APPLICATION_X_BZIP: &'static str = "application/x-bzip"
pub const APPLICATION_X_BZIP2: &'static str = "application/x-bzip2"
pub const APPLICATION_X_CDF: &'static str = "application/x-cdf"
pub const APPLICATION_X_CSH: &'static str = "application/x-csh"
pub const APPLICATION_MSWORD: &'static str = "application/msword"
pub const APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENTS_WORDPROCESSINGIMPL_DOCUMENT: &'static str = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
pub const APPLICATION_VND_MS_FONTOBJECT: &'static str = "application/vnd.ms-fontobject"
pub const APPLICATION_EPUB_ZIP: &'static str = "application/epub+zip"
pub const APPLICATION_GZIP: &'static str = "application/gzip"
pub const APPLICATION_JAVA_ARCHIVE: &'static str = "application/java-archive"
pub const APPLICATION_JSON: &'static str = "application/json"
pub const APPLICATION_JSONLD: &'static str = "application/ld+json"
pub const APPLICATION_VND_APPLE_INSTALLER_XML: &'static str = "application/vnd.apple.installer+xml"
pub const APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION: &'static str = "application/vnd.oasis.opendocument.presentation"
pub const APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET: &'static str = "application/vnd.oasis.opendocument.spreadsheet"
pub const APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT: &'static str = "application/vnd.oasis.opendocument.text"
pub const APPLICATION_OGG: &'static str = "application/ogg"
pub const APPLICATION_PDF: &'static str = "application/pdf"
pub const APPLICATION_X_HTTPD_PHP: &'static str = "application/x-httpd-php"
pub const APPLICATION_VND_MS_POWERPOINT: &'static str = "application/vnd.ms-powerpoint"
pub const APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION: &'static str = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
pub const APPLICATION_VND_RAR: &'static str = "application/vnd.rar"
pub const APPLICATION_RTF: &'static str = "application/rtf"
pub const APPLICATION_X_SH: &'static str = "application/x-sh"
pub const APPLICATION_X_SHOCKWAVE_FLASH: &'static str = "application/x-shockwave-flash"
pub const APPLICATION_X_TAR: &'static str = "application/x-tar"
pub const APPLICATION_VND_VISIO: &'static str = "application/vnd.visio"
pub const APPLICATION_XHTML_XML: &'static str = "application/xhtml+xml"
pub const APPLICATION_VND_MS_EXCEL: &'static str = "application/vnd.ms-excel"
pub const APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET: &'static str = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
pub const APPLICATION_XML: &'static str = "application/xml"
pub const APPLICATION_VND_MOZILLA_XUL_XML: &'static str = "application/vnd.mozilla.xul+xml"
pub const APPLICATION_ZIP: &'static str = "application/zip"
pub const APPLICATION_X_7Z_COMPRESSED: &'static str = "application/x-7z-compressed"
pub const APPLICATION_X_X509_CA_CERT: &'static str = "application/x-x509-ca-cert"
pub const TEXT_PLAIN: &'static str = "text/plain"
pub const TEXT_CSS: &'static str = "text/css"
pub const TEXT_CSV: &'static str = "text/csv"
pub const TEXT_HTML: &'static str = "text/html"
pub const TEXT_JAVASCRIPT: &'static str = "text/javascript"
pub const TEXT_CALENDAR: &'static str = "text/calendar"
pub const IMAGE_APNG: &'static str = "image/apng"
pub const IMAGE_AVIF: &'static str = "image/avif"
pub const IMAGE_GIF: &'static str = "image/gif"
pub const IMAGE_JPEG: &'static str = "image/jpeg"
pub const IMAGE_PNG: &'static str = "image/png"
pub const IMAGE_SVG: &'static str = "image/svg+xml"
pub const IMAGE_WEBP: &'static str = "image/webp"
pub const IMAGE_BMP: &'static str = "image/bmp"
pub const IMAGE_ICO: &'static str = "image/x-icon"
pub const IMAGE_TIFF: &'static str = "image/tiff"
pub const AUDIO_AAC: &'static str = "audio/aac"
pub const AUDIO_FLAC: &'static str = "audio/flac"
pub const AUDIO_WAV: &'static str = "audio/wav"
pub const AUDIO_MP4: &'static str = "audio/mp4"
pub const AUDIO_OGG: &'static str = "audio/oga"
pub const AUDIO_MIDI: &'static str = "audio/midi"
pub const AUDIO_MPEG: &'static str = "audio/mpeg"
pub const AUDIO_OPUS: &'static str = "audio/opus"
pub const AUDIO_WEBM: &'static str = "audio/webm"
pub const VIDEO_3GP: &'static str = "video/3gpp"
pub const VIDEO_MPEG: &'static str = "video/mpeg"
pub const VIDEO_MP4: &'static str = "video/mp4"
pub const VIDEO_OGG: &'static str = "video/ogg"
pub const VIDEO_QUICKTIME: &'static str = "video/quicktime"
pub const VIDEO_WEBM: &'static str = "video/webm"
pub const VIDEO_X_MSVIDEO: &'static str = "video/x-msvideo"
pub const VIDEO_MP2T: &'static str = "video/mp2t"
pub const VIDEO_3GPP2: &'static str = "video/3gpp2"
pub const FONT_OTF: &'static str = "font/otf"
pub const FONT_TTF: &'static str = "font/ttf"
pub const FONT_WOFF: &'static str = "font/woff"
pub const FONT_WOFF2: &'static str = "font/woff2"
pub const TXT_SUFFIX: &'static str = ".txt"
pub const CSS_SUFFIX: &'static str = ".css"
pub const HTML_SUFFIX: &'static str = ".html"
pub const HTM_SUFFIX: &'static str = ".htm"
pub const JS_SUFFIX: &'static str = ".js"
pub const MJS_SUFFIX: &'static str = ".mjs"
pub const APNG_SUFFIX: &'static str = ".apng"
pub const AVIF_SUFFIX: &'static str = ".avif"
pub const GIF_SUFFIX: &'static str = ".gif"
pub const JPG_SUFFIX: &'static str = ".jpg"
pub const JPEG_SUFFIX: &'static str = ".jpeg"
pub const JPE_SUFFIX: &'static str = ".jpe"
pub const JIF_SUFFIX: &'static str = ".jif"
pub const JFIF_SUFFIX: &'static str = ".jfif"
pub const PNG_SUFFIX: &'static str = ".png"
pub const SVG_SUFFIX: &'static str = ".svg"
pub const WEBP_SUFFIX: &'static str = ".webp"
pub const BMP_SUFFIX: &'static str = ".bmp"
pub const ICO_SUFFIX: &'static str = ".ico"
pub const CUR_SUFFIX: &'static str = ".cur"
pub const TIF_SUFFIX: &'static str = ".tif"
pub const TIFF_SUFFIX: &'static str = ".tiff"
pub const AAC_SUFFIX: &'static str = ".aac"
pub const FLAC_SUFFIX: &'static str = ".flac"
pub const WAV_SUFFIX: &'static str = ".wav"
pub const M4A_SUFFIX: &'static str = ".m4a"
pub const N3GP_SUFFIX: &'static str = ".3gp"
pub const MPG_SUFFIX: &'static str = ".mpg"
pub const MPEG_SUFFIX: &'static str = ".mpeg"
pub const MP4_SUFFIX: &'static str = ".mp4"
pub const M4V_SUFFIX: &'static str = ".m4v"
pub const M4P_SUFFIX: &'static str = ".m4p"
pub const OGA_SUFFIX: &'static str = ".oga"
pub const OGG_SUFFIX: &'static str = ".ogg"
pub const OGV_SUFFIX: &'static str = ".ogv"
pub const MOV_SUFFIX: &'static str = ".mov"
pub const WEBM_SUFFIX: &'static str = ".webm"
pub const ABW_SUFFIX: &'static str = ".abw"
pub const AVI_SUFFIX: &'static str = ".avi"
pub const AZV_SUFFIX: &'static str = ".azw"
pub const BIN_SUFFIX: &'static str = ".bin"
pub const BZ_SUFFIX: &'static str = ".bz"
pub const BZ2_SUFFIX: &'static str = ".bz2"
pub const CDA_SUFFIX: &'static str = ".cda"
pub const CSH_SUFFIX: &'static str = ".csh"
pub const CSV_SUFFIX: &'static str = ".csv"
pub const DOC_SUFFIX: &'static str = ".doc"
pub const DOCX_SUFFIX: &'static str = ".docx"
pub const EOT_SUFFIX: &'static str = ".eot"
pub const EPUB_SUFFIX: &'static str = ".epub"
pub const GZ_SUFFIX: &'static str = ".gz"
pub const ICS_SUFFIX: &'static str = ".ics"
pub const JAR_SUFFIX: &'static str = ".jar"
pub const JSON_SUFFIX: &'static str = ".json"
pub const JSONLD_SUFFIX: &'static str = ".jsonld"
pub const MIDI_SUFFIX: &'static str = ".midi"
pub const MID_SUFFIX: &'static str = ".mid"
pub const MP3_SUFFIX: &'static str = ".mp3"
pub const MPKG_SUFFIX: &'static str = ".mpkg"
pub const ODP_SUFFIX: &'static str = ".odp"
pub const ODS_SUFFIX: &'static str = ".ods"
pub const ODT_SUFFIX: &'static str = ".odt"
pub const OGX_SUFFIX: &'static str = ".ogx"
pub const OPUS_SUFFIX: &'static str = ".opus"
pub const OTF_SUFFIX: &'static str = ".otf"
pub const PDF_SUFFIX: &'static str = ".pdf"
pub const PHP_SUFFIX: &'static str = ".php"
pub const PPT_SUFFIX: &'static str = ".ppt"
pub const PPTX_SUFFIX: &'static str = ".pptx"
pub const RAR_SUFFIX: &'static str = ".rar"
pub const RTF_SUFFIX: &'static str = ".rtf"
pub const SH_SUFFIX: &'static str = ".sh"
pub const SWF_SUFFIX: &'static str = ".swf"
pub const TAR_SUFFIX: &'static str = ".tar"
pub const TS_SUFFIX: &'static str = ".ts"
pub const TTF_SUFFIX: &'static str = ".ttf"
pub const VSD_SUFFIX: &'static str = ".vsd"
pub const WEBA_SUFFIX: &'static str = ".weba"
pub const WOFF_SUFFIX: &'static str = ".woff"
pub const WOFF2_SUFFIX: &'static str = ".woff2"
pub const XHTML_SUFFIX: &'static str = ".xhtml"
pub const XLS_SUFFIX: &'static str = ".xls"
pub const XLSX_SUFFIX: &'static str = ".xlsx"
pub const XML_SUFFIX: &'static str = ".xml"
pub const XUL_SUFFIX: &'static str = ".xul"
pub const ZIP_SUFFIX: &'static str = ".zip"
pub const N7Z_SUFFIX: &'static str = ".7z"
pub const N3G2_SUFFIX: &'static str = ".3g2"
pub const CRT_SUFFIX: &'static str = ".crt"
pub fn detect_mime_type(request_uri: &str) -> String
pub fn get_extension_from_filename(filename: &str) -> Option<&str>
Auto Trait Implementations§
impl Freeze for MimeType
impl RefUnwindSafe for MimeType
impl Send for MimeType
impl Sync for MimeType
impl Unpin for MimeType
impl UnwindSafe for MimeType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more