docs(headers): add header examples
This commit is contained in:
		| @@ -26,6 +26,26 @@ header! { | ||||
|     #[doc="* `\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"`"] | ||||
|     #[doc="* `W/\"xyzzy\", W/\"r2d2xxxx\", W/\"c3piozzzz\"`"] | ||||
|     #[doc="* `*`"] | ||||
|     #[doc=""] | ||||
|     #[doc="# Examples"] | ||||
|     #[doc="```"] | ||||
|     #[doc="use hyper::header::{Headers, IfNoneMatch};"] | ||||
|     #[doc=""] | ||||
|     #[doc="let mut headers = Headers::new();"] | ||||
|     #[doc="headers.set(IfNoneMatch::Any);"] | ||||
|     #[doc="```"] | ||||
|     #[doc="```"] | ||||
|     #[doc="use hyper::header::{Headers, IfNoneMatch, EntityTag};"] | ||||
|     #[doc=""] | ||||
|     #[doc="let mut headers = Headers::new();"] | ||||
|     #[doc="headers.set("] | ||||
|     #[doc="    IfNoneMatch::Items(vec!["] | ||||
|     #[doc="        EntityTag::new(false, \"xyzzy\".to_owned()),"] | ||||
|     #[doc="        EntityTag::new(false, \"foobar\".to_owned()),"] | ||||
|     #[doc="        EntityTag::new(false, \"bazquux\".to_owned()),"] | ||||
|     #[doc="    ])"] | ||||
|     #[doc=");"] | ||||
|     #[doc="```"] | ||||
|     (IfNoneMatch, "If-None-Match") => {Any / (EntityTag)+} | ||||
|  | ||||
|     test_if_none_match { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user