pub enum MimeType {
Show 30 variants
TextPlain,
TextHtml,
TextCss,
TextJavascript,
TextXml,
TextMarkdown,
TextRust,
TextC,
TextCpp,
TextPython,
TextShell,
ImagePng,
ImageJpeg,
ImageGif,
ImageBmp,
ImageSvg,
ImagePpm,
AudioWav,
AudioMp3,
AudioOgg,
VideoMp4,
VideoAvi,
ApplicationPdf,
ApplicationZip,
ApplicationTar,
ApplicationGzip,
ApplicationElf,
ApplicationDesktop,
DirectoryType,
Unknown,
}Expand description
Supported MIME types
Variants§
TextPlain
TextHtml
TextCss
TextJavascript
TextXml
TextMarkdown
TextRust
TextC
TextCpp
TextPython
TextShell
ImagePng
ImageJpeg
ImageGif
ImageBmp
ImageSvg
ImagePpm
AudioWav
AudioMp3
AudioOgg
VideoMp4
VideoAvi
ApplicationPdf
ApplicationZip
ApplicationTar
ApplicationGzip
ApplicationElf
ApplicationDesktop
DirectoryType
Unknown
Implementations§
Source§impl MimeType
impl MimeType
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Return the standard MIME string. Convenience wrapper around
MimeDatabase::mime_to_str.
Sourcepub fn category(&self) -> MimeCategory
pub fn category(&self) -> MimeCategory
Return the broad category.
Sourcepub fn icon_color(&self) -> u32
pub fn icon_color(&self) -> u32
Return a BGRA icon color for this type.
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Return true if this is the directory pseudo-type.
Sourcepub fn is_executable(&self) -> bool
pub fn is_executable(&self) -> bool
Return true if this is an executable binary.
Sourcepub fn is_archive(&self) -> bool
pub fn is_archive(&self) -> bool
Return true if this is an archive format.
Trait Implementations§
impl Copy for MimeType
impl Eq for MimeType
impl StructuralPartialEq for MimeType
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)