Bug 1885602 - Part 2: Add a MozillaAccountMenuButton composable for the menu redesign...
[gecko.git] / third_party / rust / mime / README.md
blobdba63140780408d103410e3cb8d67a097a623224
1 # mime
3 [![Build Status](https://travis-ci.org/hyperium/mime.svg?branch=master)](https://travis-ci.org/hyperium/mime)
4 [![crates.io](https://img.shields.io/crates/v/mime.svg)](https://crates.io/crates/mime)
5 [![docs.rs](https://docs.rs/mime/badge.svg)](https://docs.rs/mime)
7 Support MIME (Media Types) as strong types in Rust.
9 [Documentation](https://docs.rs/mime)
11 ## Usage
13 ```rust
14 extern crate mime;
16 // common types are constants
17 let text = mime::TEXT_PLAIN;
19 // deconstruct Mimes to match on them
20 match (text.type_(), text.subtype()) {
21     (mime::TEXT, mime::PLAIN) => {
22         // plain text!
23     },
24     (mime::TEXT, _) => {
25         // structured text!
26     },
27     _ => {
28         // not text!
29     }
31 ```