pub enum MediaType<'a> {
Image(&'a str),
Video(&'a str),
Audio(&'a str),
Text(&'a str),
Application(&'a str),
Other(&'a str),
Unknown,
}Expand description
Represents the MIME type of a message’s attachment data
The interior str contains the subtype, i.e. x-m4a for audio/x-m4a
Variants§
Image(&'a str)
Image MIME type, such as "image/png" or "image/jpeg"
Video(&'a str)
Video MIME type, such as "video/mp4" or "video/quicktime"
Audio(&'a str)
Audio MIME type, such as "audio/mp3" or "audio/x-m4a“
Text(&'a str)
Text MIME type, such as "text/plain" or "text/html"
Application(&'a str)
Application MIME type, such as "application/pdf" or "application/json"
Other(&'a str)
Other MIME types that don’t fit the standard categories
Unknown
Unknown MIME type when the type could not be determined
Implementations§
Trait Implementations§
impl<'a> Eq for MediaType<'a>
impl<'a> StructuralPartialEq for MediaType<'a>
Auto Trait Implementations§
impl<'a> Freeze for MediaType<'a>
impl<'a> RefUnwindSafe for MediaType<'a>
impl<'a> Send for MediaType<'a>
impl<'a> Sync for MediaType<'a>
impl<'a> Unpin for MediaType<'a>
impl<'a> UnwindSafe for MediaType<'a>
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.