commit | 21aed309c82d4acdd4b8407391e4b2be67160c68 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Aug 08 01:13:12 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Aug 08 01:13:12 2024 +0000 |
tree | a21409c93975f20ffed460d00a8eff7bf7ae3203 | |
parent | 47e23d539b8f558151c2bc6b71907a1336abd8ea [diff] | |
parent | ecf4c4bcc456e501ebb55d1ad5a9d9345fe371bb [diff] |
Snap for 12199973 from ecf4c4bcc456e501ebb55d1ad5a9d9345fe371bb to 24Q4-release Change-Id: I4ec745c5c8cdd6e87df919f3f57dce41a4f58197
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! } }