1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
use http::Header;

pub use cookie::Cookie;
pub use cookie::CookieJar;
pub use cookie::CookieBuilder;

/// Type alias to a `'static` CookieJar.
///
/// A `CookieJar` should never be used without a `'static` lifetime. As a
/// result, you should always use this alias.
pub type Cookies = self::CookieJar<'static>;

impl<'c> From<Cookie<'c>> for Header<'static> {
    fn from(cookie: Cookie) -> Header<'static> {
        Header::new("Set-Cookie", cookie.encoded().to_string())
    }
}