Expand description
§mediatypes
A comprehensive collection of MIME types (media types) as string constants.
This crate provides an organized, hierarchical structure of all standard MIME types registered with IANA, making it easy to reference media types in a type-safe manner.
§Usage
use mediatypes::application::X_WWW_FORM_URLENCODED;
use mediatypes::image::PNG;
use mediatypes::text::HTML;
assert_eq!(X_WWW_FORM_URLENCODED, "application/x-www-form-urlencoded");
assert_eq!(PNG, "image/png");
assert_eq!(HTML, "text/html");§Organization
MIME types are organized by their top-level type:
application- Application-specific dataaudio- Audio datachemical- Chemical data and molecular structuresfont- Font dataimage- Image datamessage- Message protocol datamodel- 3D model datamultipart- Multi-part datatext- Human-readable textvideo- Video datax_conference- Conference-related experimental typesx_shader- Shader-related experimental types
Modules§
- application
- Application-specific MIME types Application MIME types
- audio
- Audio MIME types Audio MIME types
- chemical
- Chemical MIME types Chemical MIME types
- font
- Font MIME types Font MIME types
- image
- Image MIME types Image MIME types
- message
- Message protocol MIME types Message MIME types
- model
- 3D model MIME types Model MIME types
- multipart
- Multi-part MIME types Multipart MIME types
- text
- Text MIME types Text MIME types
- video
- Video MIME types Video MIME types
- x_
conference - Conference-related experimental MIME types X-conference MIME types
- x_
shader - Shader-related experimental MIME types X-shader MIME types