commit | 8ad6b5347f85127618edac146c75f688cd63c784 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 29 23:11:13 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 29 23:11:13 2024 +0000 |
tree | 652d027ccf2b62b84f6b5416a61fb5ff04a83153 | |
parent | 21aed309c82d4acdd4b8407391e4b2be67160c68 [diff] | |
parent | 3d232ad32b689d35f0361d8f59f7ea2f4183c463 [diff] |
Snap for 12296955 from 3d232ad32b689d35f0361d8f59f7ea2f4183c463 to 24Q4-release Change-Id: I1573ca1cff5b3091520f534df29f48e3c53e5f4a
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! } }