commit | 47e23d539b8f558151c2bc6b71907a1336abd8ea | [log] [tgz] |
---|---|---|
author | Inna Palant <[email protected]> | Tue Jun 11 20:57:26 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Jun 11 20:57:26 2024 +0000 |
tree | ae87bc0971636e689f0b75d86635b4306212f385 | |
parent | cd6f1225308b52a2913b0ca28bc62b50db835417 [diff] | |
parent | 4d1dca781411cfd9a8eab87f5606b5ad54473edd [diff] |
Merge remote-tracking branch 'origin/upstream' am: b636849df3 am: 4d1dca7814 Original change: undetermined Change-Id: Ib9d969d8329d3c1ddbdd4d0adf758a8e317fbca7 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! } }