Macro mime::mime [] [src]

macro_rules! mime {
    ($top:tt / $sub:tt) => { ... };
    ($top:tt / $sub:tt ; $($attr:tt = $val:tt),*) => { ... };
}

Easily create a Mime without having to import so many enums.

Example


let json = mime!(Application/Json);
let plain = mime!(Text/Plain; Charset=Utf8);
let text = mime!(Text/Html; Charset=("bar"), ("baz")=("quux"));
let img = mime!(Image/_);