1 unstable release
| 0.1.0 | Apr 27, 2021 |
|---|
#334 in Email
24,019 downloads per month
Used in 3 crates
(2 directly)
44KB
1K
SLoC
Internal types for the mime crate.
Nothing to see here. Move along.
Based on the apparently unmaintained mime crate
mime
Support MIME (HTTP Media Types) as strong types in Rust.
Usage
extern crate mime;
fn main() {
// common types are constants
let text = mime::TEXT_PLAIN;
// deconstruct Mimes to match on them
match (text.type_(), text.subtype()) {
(mime::TEXT, mime::PLAIN) => {
// plain text!
},
(mime::TEXT, _) => {
// structured text!
},
_ => {
// not text!
}
}
}