cogo_http/header/common/from.rs
1header! {
2 /// `From` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.1)
3 ///
4 /// The `From` header field contains an Internet email address for a
5 /// human user who controls the requesting user agent. The address ought
6 /// to be machine-usable.
7 /// # ABNF
8 /// ```plain
9 /// From = mailbox
10 /// mailbox = <mailbox, see [RFC5322], Section 3.4>
11 /// ```
12 ///
13 /// # Example
14 /// ```
15 /// use cogo_http::header::{Headers, From};
16 ///
17 /// let mut headers = Headers::new();
18 /// headers.set(From("webmaster@example.org".to_owned()));
19 /// ```
20 // FIXME: Maybe use mailbox?
21 (From, "From") => [String]
22
23 test_from {
24 test_header!(test1, vec![b"webmaster@example.org"]);
25 }
26}