Debian Codegraph @

third_party/rust/headers/src/disabled/from.rs

raw
1 header! {
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 headers::{Headers, From};
19 ///
20 /// let mut headers = Headers::new();
21 /// headers.set(From("[email protected]".to_owned()));
22 /// ```
23 // FIXME: Maybe use mailbox?
24 (From, FROM) => [String]
25
26 test_from {
27 test_header!(test1, vec![b"[email protected]"]);
28 }
29 }