commit | cbf8625e9c2169eea53ba2774433498cd40fb03e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Aug 29 01:11:15 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Aug 29 01:11:15 2024 +0000 |
tree | 652d027ccf2b62b84f6b5416a61fb5ff04a83153 | |
parent | 3b93c0d25bf5bfad302b6dca235ba90ee477c80f [diff] | |
parent | f98dc25f5c5c846e60973323b32bf88b6a7e89d4 [diff] |
Snap for 12291954 from f98dc25f5c5c846e60973323b32bf88b6a7e89d4 to sdk-release Change-Id: I56c82f2237c6deec20514ebcad68bdc867c2bb1e
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! } }