---
title: mime
summary: Media types (also known as Multipurpose Internet Mail Extensions or MIME types).
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/mime/
---

**Kind:** Module  
**Package:** fastly 0.13.1  
**Path:** `fastly::mime`

[Media types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) (also known as Multipurpose Internet Mail Extensions or MIME types).

This module re-exports the [`mime`](https://docs.rs/mime/0.3.17/mime/index.html) crate for convenient use in Compute
programs. See the [`mime`](https://docs.rs/mime/0.3.17/mime/index.html) documentation and [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) for details.

## Structs

| Name | Summary |
| --- | --- |
| [FromStrError](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/mime/struct.FromStrError/) | An error when parsing a `Mime` from a string. |
| [Mime](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/mime/struct.Mime/) | A parsed mime or media type. |
| [MimeIter](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/mime/struct.MimeIter/) | An iterator of parsed mime |
| [Name](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/mime/struct.Name/) | A section of a `Mime`. |
| [Params](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/mime/struct.Params/) | An iterator over the parameters of a MIME. |

## Constants

### STAR

**Type:** `Name`  
**Flags:** read-only

*

### TEXT

**Type:** `Name`  
**Flags:** read-only

text

### IMAGE

**Type:** `Name`  
**Flags:** read-only

image

### AUDIO

**Type:** `Name`  
**Flags:** read-only

audio

### VIDEO

**Type:** `Name`  
**Flags:** read-only

video

### APPLICATION

**Type:** `Name`  
**Flags:** read-only

application

### MULTIPART

**Type:** `Name`  
**Flags:** read-only

multipart

### MESSAGE

**Type:** `Name`  
**Flags:** read-only

message

### MODEL

**Type:** `Name`  
**Flags:** read-only

model

### FONT

**Type:** `Name`  
**Flags:** read-only

font

### PLAIN

**Type:** `Name`  
**Flags:** read-only

plain

### HTML

**Type:** `Name`  
**Flags:** read-only

html

### XML

**Type:** `Name`  
**Flags:** read-only

xml

### JAVASCRIPT

**Type:** `Name`  
**Flags:** read-only

javascript

### CSS

**Type:** `Name`  
**Flags:** read-only

css

### CSV

**Type:** `Name`  
**Flags:** read-only

csv

### EVENT_STREAM

**Type:** `Name`  
**Flags:** read-only

event-stream

### VCARD

**Type:** `Name`  
**Flags:** read-only

vcard

### JSON

**Type:** `Name`  
**Flags:** read-only

json

### WWW_FORM_URLENCODED

**Type:** `Name`  
**Flags:** read-only

x-www-form-urlencoded

### MSGPACK

**Type:** `Name`  
**Flags:** read-only

msgpack

### OCTET_STREAM

**Type:** `Name`  
**Flags:** read-only

octet-stream

### PDF

**Type:** `Name`  
**Flags:** read-only

pdf

### WOFF

**Type:** `Name`  
**Flags:** read-only

woff

### WOFF2

**Type:** `Name`  
**Flags:** read-only

woff2

### FORM_DATA

**Type:** `Name`  
**Flags:** read-only

form-data

### BMP

**Type:** `Name`  
**Flags:** read-only

bmp

### GIF

**Type:** `Name`  
**Flags:** read-only

gif

### JPEG

**Type:** `Name`  
**Flags:** read-only

jpeg

### PNG

**Type:** `Name`  
**Flags:** read-only

png

### SVG

**Type:** `Name`  
**Flags:** read-only

svg

### BASIC

**Type:** `Name`  
**Flags:** read-only

basic

### MPEG

**Type:** `Name`  
**Flags:** read-only

mpeg

### MP4

**Type:** `Name`  
**Flags:** read-only

mp4

### OGG

**Type:** `Name`  
**Flags:** read-only

ogg

### CHARSET

**Type:** `Name`  
**Flags:** read-only

charset

### BOUNDARY

**Type:** `Name`  
**Flags:** read-only

boundary

### UTF_8

**Type:** `Name`  
**Flags:** read-only

utf-8

### STAR_STAR

**Type:** `Mime`  
**Flags:** read-only

`
*/*
`

### TEXT_STAR

**Type:** `Mime`  
**Flags:** read-only

`
text/*
`

### TEXT_PLAIN

**Type:** `Mime`  
**Flags:** read-only

`
text/plain
`

### TEXT_PLAIN_UTF_8

**Type:** `Mime`  
**Flags:** read-only

`
text/plain; charset=utf-8
`

### TEXT_HTML

**Type:** `Mime`  
**Flags:** read-only

`
text/html
`

### TEXT_HTML_UTF_8

**Type:** `Mime`  
**Flags:** read-only

`
text/html; charset=utf-8
`

### TEXT_CSS

**Type:** `Mime`  
**Flags:** read-only

`
text/css
`

### TEXT_CSS_UTF_8

**Type:** `Mime`  
**Flags:** read-only

`
text/css; charset=utf-8
`

### TEXT_JAVASCRIPT

**Type:** `Mime`  
**Flags:** read-only

`
text/javascript
`

### TEXT_XML

**Type:** `Mime`  
**Flags:** read-only

`
text/xml
`

### TEXT_EVENT_STREAM

**Type:** `Mime`  
**Flags:** read-only

`
text/event-stream
`

### TEXT_CSV

**Type:** `Mime`  
**Flags:** read-only

`
text/csv
`

### TEXT_CSV_UTF_8

**Type:** `Mime`  
**Flags:** read-only

`
text/csv; charset=utf-8
`

### TEXT_TAB_SEPARATED_VALUES

**Type:** `Mime`  
**Flags:** read-only

`
text/tab-separated-values
`

### TEXT_TAB_SEPARATED_VALUES_UTF_8

**Type:** `Mime`  
**Flags:** read-only

`
text/tab-separated-values; charset=utf-8
`

### TEXT_VCARD

**Type:** `Mime`  
**Flags:** read-only

`
text/vcard
`

### IMAGE_STAR

**Type:** `Mime`  
**Flags:** read-only

`
image/*
`

### IMAGE_JPEG

**Type:** `Mime`  
**Flags:** read-only

`
image/jpeg
`

### IMAGE_GIF

**Type:** `Mime`  
**Flags:** read-only

`
image/gif
`

### IMAGE_PNG

**Type:** `Mime`  
**Flags:** read-only

`
image/png
`

### IMAGE_BMP

**Type:** `Mime`  
**Flags:** read-only

`
image/bmp
`

### IMAGE_SVG

**Type:** `Mime`  
**Flags:** read-only

`
image/svg+xml
`

### FONT_WOFF

**Type:** `Mime`  
**Flags:** read-only

`
font/woff
`

### FONT_WOFF2

**Type:** `Mime`  
**Flags:** read-only

`
font/woff2
`

### APPLICATION_JSON

**Type:** `Mime`  
**Flags:** read-only

`
application/json
`

### APPLICATION_JAVASCRIPT

**Type:** `Mime`  
**Flags:** read-only

`
application/javascript
`

### APPLICATION_JAVASCRIPT_UTF_8

**Type:** `Mime`  
**Flags:** read-only

`
application/javascript; charset=utf-8
`

### APPLICATION_WWW_FORM_URLENCODED

**Type:** `Mime`  
**Flags:** read-only

`
application/x-www-form-urlencoded
`

### APPLICATION_OCTET_STREAM

**Type:** `Mime`  
**Flags:** read-only

`
application/octet-stream
`

### APPLICATION_MSGPACK

**Type:** `Mime`  
**Flags:** read-only

`
application/msgpack
`

### APPLICATION_PDF

**Type:** `Mime`  
**Flags:** read-only

`
application/pdf
`

### MULTIPART_FORM_DATA

**Type:** `Mime`  
**Flags:** read-only

`
multipart/form-data
`
