Migrate 25 crates to monorepo. am: f98dc25f5c Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/mime/+/3248512 Change-Id: Icb024db87bd48378a5bc570fdad0ed6938c187ea Signed-off-by: Automerger Merge Worker <[email protected]>
Support MIME (Media Types) as strong types in Rust.
extern crate mime; // 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! } }