Expand description
use std::str::FromStr;
let text = mime2::text::PLAIN;
assert_eq!(text.ttype, "text");
assert_eq!(text.subtype,"plain");
assert_eq!(text.to_string(),"text/plain");
assert_eq!(mime2::Mime::from_str("text/plain"), Ok(text));
Modules§
- application
- Media types for the application type.
- font
- Media types for the font type.
- haptics
- Media types for the haptics type.
- image
- Media types for the image type.
- message
- Media types for the message type.
- model
- Media types for the model type.
- multipart
- Media types for the multipart type.
- text
- Media types for the text type.
- video
- Media types for the video type.
Structs§
- Mime
- A media type (also known as a Multipurpose Internet Mail Extensions or MIME type) indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF’s RFC 6838.
- Parse
Mime Error - Error type for
Mime
std::str::FromStr
.