1pub trait HeaderNameAlg {
9 const HEADER_NAME: &'static str;
11}
12
13macro_rules! header_names {
14 ($($marker:ident => $name:literal),+ $(,)?) => {
15 $(
16 #[doc = concat!("States the `", $name, "` header an answer carries.")]
17 #[derive(Debug, Default)]
18 pub struct $marker;
19
20 impl HeaderNameAlg for $marker {
21 const HEADER_NAME: &'static str = $name;
22 }
23 )+
24 };
25}
26
27header_names! {
28 CacheControl => "cache-control",
29 ContentDisposition => "content-disposition",
30 ContentLanguage => "content-language",
31 ETag => "etag",
32 Expires => "expires",
33 LastModified => "last-modified",
34 Link => "link",
35 Location => "location",
36 RetryAfter => "retry-after",
37 Vary => "vary",
38}