1 unstable release

0.1.0 Apr 27, 2021

#334 in Email

Download history 5105/week @ 2025-04-12 5456/week @ 2025-04-19 5858/week @ 2025-04-26 6219/week @ 2025-05-03 8573/week @ 2025-05-10 6013/week @ 2025-05-17 4508/week @ 2025-05-24 6853/week @ 2025-05-31 5830/week @ 2025-06-07 6510/week @ 2025-06-14 5358/week @ 2025-06-21 5647/week @ 2025-06-28 5222/week @ 2025-07-05 5559/week @ 2025-07-12 6486/week @ 2025-07-19 5977/week @ 2025-07-26

24,019 downloads per month
Used in 3 crates (2 directly)

MIT license

44KB
1K SLoC

Internal types for the mime crate.

Nothing to see here. Move along.


Based on the apparently unmaintained mime crate

mime

Build Status crates.io docs.rs

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

Documentation

Usage

extern crate mime;

fn main() {
    // 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!
        }
    }
}

No runtime deps