talira

mime (Rust)

MIME (HTTP media types) as strong types in Rust

open sourceMITfree

mime is a Rust crate from the hyperium project for working with MIME types (HTTP media types) as strong types: common types are constants such as mime::TEXT_PLAIN, and a parsed MIME type can be taken apart into its type and subtype to match on them. It's a different product from Dart's mime package.

Problems it solves

  • parse and compare Content-Type values in Rust
  • use typed MIME constants instead of strings in a Rust HTTP app
  • match on a request's media type in Rust

Features

  • constants for common MIME types
  • parse MIME strings into strongly typed values
  • match on a MIME type's type and subtype

Alternatives

The same job

These do what mime (Rust) does.

  1. http Common HTTP types for Rust

Compare mime (Rust) with the top 3