Registry / utility / media-type

media-type

JSON →
library0.0.1rscratesunverified

Implementation for parsing and handling media types (MIME types).

# Cargo.toml [dependencies] media-type = "0.0.1"
INSTALL
IMPORT
SIG · MEDIA-TYPE
M
media-type
utilityrustv0.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MediaType
use media_type::MediaType;

Parse a media type string and access its components.

use media_type::MediaType; fn main() { let mt: MediaType = "application/json".parse().unwrap(); println!("Type: {}, Subtype: {}", mt.type_(), mt.subtype()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
media-type — cargo add media-type · libregistry