pub enum MimeType {
Css,
Csv,
Html,
Ico,
Js,
Json,
Jsonld,
Mp4,
OctetStream,
Rtf,
Svg,
Txt,
}
Expand description
Variants§
Implementations§
Source§impl MimeType
impl MimeType
Sourcepub fn parse_from_uri(uri: &str) -> MimeType
pub fn parse_from_uri(uri: &str) -> MimeType
parse a URI suffix to convert text/plain mimeType to their actual web compatible mimeType.
Sourcepub fn parse_from_uri_with_fallback(uri: &str, fallback: MimeType) -> MimeType
pub fn parse_from_uri_with_fallback(uri: &str, fallback: MimeType) -> MimeType
parse a URI suffix to convert text/plain mimeType to their actual web compatible mimeType with specified fallback for unknown file extensions.
Trait Implementations§
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