commit | f98dc25f5c5c846e60973323b32bf88b6a7e89d4 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Aug 28 16:52:40 2024 +0000 |
committer | James Farrell <[email protected]> | Wed Aug 28 16:52:40 2024 +0000 |
tree | 652d027ccf2b62b84f6b5416a61fb5ff04a83153 | |
parent | f448de29cbd1021a22f02f7ea1023bf9c224ed77 [diff] |
Migrate 25 crates to monorepo. miette mime mio mls-rs-codec mls-rs-codec-derive mls-rs-core mockall named-lock nom no-panic num_cpus num-integer num-traits oorandom os_str_bytes p9 p9_wire_format_derive parking_lot parking_lot_core pathdiff pdl-runtime pest pest_derive pest_generator pest_meta Bug: 339424309 Test: treehugger Change-Id: If273bc7efcd82a1492aafd167ab4520235c05c8b
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! } }