docs(headers): add header examples

This commit is contained in:
Chandler Latour
2015-05-28 08:55:32 -06:00
parent 5a9c41a2a1
commit c940e84a78
41 changed files with 856 additions and 0 deletions

View File

@@ -19,6 +19,25 @@ header! {
#[doc=""]
#[doc="# Example values"]
#[doc="* `gzip`"]
#[doc=""]
#[doc="# Examples"]
#[doc="```"]
#[doc="use hyper::header::{Headers, ContentEncoding, Encoding};"]
#[doc=""]
#[doc="let mut headers = Headers::new();"]
#[doc="headers.set(ContentEncoding(vec![Encoding::Chunked]));"]
#[doc="```"]
#[doc="```"]
#[doc="use hyper::header::{Headers, ContentEncoding, Encoding};"]
#[doc=""]
#[doc="let mut headers = Headers::new();"]
#[doc="headers.set("]
#[doc=" ContentEncoding(vec!["]
#[doc=" Encoding::Gzip,"]
#[doc=" Encoding::Chunked,"]
#[doc=" ])"]
#[doc=");"]
#[doc="```"]
(ContentEncoding, "Content-Encoding") => (Encoding)+
test_content_encoding {