docs(headers): Explain content_type assigned type

Explain why content_type mime params are not generic over slice.

Related to #991
This commit is contained in:
derekdreery
2017-01-18 00:05:54 +00:00
committed by Sean McArthur
parent 1868f8548d
commit b64665635f

View File

@@ -12,6 +12,10 @@ header! {
/// within the scope of the received message semantics, after any content
/// codings indicated by Content-Encoding are decoded.
///
/// Although the `mime` crate allows the mime options to be any slice, this crate
/// forces the use of Vec. This is to make sure the same header can't have more than 1 type. If
/// this is an issue, it's possible to implement `Header` on a custom struct.
///
/// # ABNF
/// ```plain
/// Content-Type = media-type