Module reqwest::mime
[−]
[src]
Mime
Mime is now Media Type, technically, but Mime
is more immediately
understandable, so the main type here is Mime
.
What is Mime?
Example mime string: text/plain
let plain_text: mime::Mime = "text/plain".parse().unwrap(); assert_eq!(plain_text, mime::TEXT_PLAIN);
Inspecting Mimes
let mime = mime::TEXT_PLAIN; match (mime.type_(), mime.subtype()) { (mime::TEXT, mime::PLAIN) => println!("plain text!"), (mime::TEXT, _) => println!("structured text"), _ => println!("not text"), }
Structs
FromStrError |
An error when parsing a |
Mime |
A parsed mime or media type. |
Name |
A section of a |
Params |
An iterator over the parameters of a MIME. |