mime (0.3.17)
Published 2026-03-26 11:00:24 +00:00 by siennathesane
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add mime@0.3.17About this package
Strongly Typed Mimes
mime
Support MIME (Media Types) as strong types in Rust.
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!
}
}
Keywords
mime
media-extensions
media-types
Details
2026-03-26 11:00:24 +00:00
Assets (1)
Versions (1)
View all
Cargo
0
Sean McArthur <sean@seanmonstar.com>
MIT OR Apache-2.0
15 KiB
mime-0.3.17.crate
15 KiB
0.3.17
2026-03-26