pub fn encode(date: &HttpDate) -> StringExpand description
Formats an HTTP date as a string in its original textual format.
The output is guaranteed to parse back with decode to the same value.
HttpDate values are always well-formed — constructed via
HttpDate::imf_fixdate, HttpDate::rfc850, or HttpDate::asctime,
or parsed with decode — so formatting cannot fail.
§Examples
use http_date::{decode, encode};
let date = decode("Sun, 06 Nov 1994 08:49:37 GMT").unwrap();
assert_eq!(encode(&date), "Sun, 06 Nov 1994 08:49:37 GMT");