commit | 0923a9443f101f515608c7a9e921f2f622cf1592 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Sep 10 23:11:04 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Sep 10 23:11:04 2024 +0000 |
tree | 652d027ccf2b62b84f6b5416a61fb5ff04a83153 | |
parent | cbf8625e9c2169eea53ba2774433498cd40fb03e [diff] | |
parent | 503c4fdb9800b3ef2aa63eda7d8a0333906bc916 [diff] |
Snap for 12349386 from 503c4fdb9800b3ef2aa63eda7d8a0333906bc916 to sdk-release Change-Id: Ica7ab0568ba6625c28ec1388e5005869f2fbded0
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! } }