#[non_exhaustive]pub enum MimeType {
Png,
Jpeg,
Tiff,
Bmp,
Gif,
Unknown(String),
}Expand description
MIME types for pictures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Png
PNG image
Jpeg
JPEG image
Tiff
TIFF image
Bmp
BMP image
Gif
GIF image
Unknown(String)
Some unknown MIME type
Implementations§
Source§impl MimeType
impl MimeType
Sourcepub fn from_str(mime_type: &str) -> Self
pub fn from_str(mime_type: &str) -> Self
Get a MimeType from a string
§Examples
use lofty::picture::MimeType;
let jpeg_mimetype_str = "image/jpeg";
assert_eq!(MimeType::from_str(jpeg_mimetype_str), MimeType::Jpeg);Trait Implementations§
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§
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