hyper_sync/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    ///
8    /// # ABNF
9    ///
10    /// ```text
11    /// From    = mailbox
12    /// mailbox = <mailbox, see [RFC5322], Section 3.4>
13    /// ```
14    ///
15    /// # Example
16    ///
17    /// ```
18    /// use hyper_sync::header::{Headers, From};
19    ///
20    /// let mut headers = Headers::new();
21    /// headers.set(From("webmaster@example.org".to_owned()));
22    /// ```
23    // FIXME: Maybe use mailbox?
24    (From, "From") => [String]
25
26    test_from {
27        test_header!(test1, vec![b"webmaster@example.org"]);
28    }
29}