Go to file
openharmony_ci 9306339249
!2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
2023-05-05 02:26:06 +00:00
benches get type and subtype matching working 2017-06-07 12:27:41 -07:00
src v0.3.17 2023-03-20 11:04:58 -04:00
.gitignore init 2014-08-27 10:30:13 -07:00
.travis.yml clean up between cargo build and cargo test in CI 2017-09-19 12:17:41 -07:00
BUILD.gn Add GN Build Files and Custom Modifications 2023-04-18 18:29:26 +08:00
Cargo.toml v0.3.17 2023-03-20 11:04:58 -04:00
CONTRIBUTING.md update readme with badges, move contribution to separate file 2017-09-19 11:50:28 -07:00
LICENSE-APACHE relicense as MIT/Apache-2.0 2017-06-07 12:31:14 -07:00
LICENSE-MIT relicense as MIT/Apache-2.0 2017-06-07 12:31:14 -07:00
README.md add a usage example to README 2017-09-19 11:58:29 -07:00
README.OpenSource README.OpenSource 中License信息整改 2023-05-04 09:35:52 +08:00

mime

Build Status crates.io docs.rs

Support MIME (Media Types) as strong types in Rust.

Documentation

Usage

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!
    }
}