Struct actix_web::http::header::Date [−][src]
pub struct Date(pub HttpDate);
Expand description
Date
header, defined
in RFC 7231 §7.1.1.2
The Date
header field represents the date and time at which the
message was originated.
ABNF
Date = HTTP-date
Example Values
Tue, 15 Nov 1994 08:12:31 GMT
Example
use std::time::SystemTime;
use actix_web::HttpResponse;
use actix_web::http::header::Date;
let mut builder = HttpResponse::Ok();
builder.insert_header(
Date(SystemTime::now().into())
);
Tuple Fields
0: HttpDate
Implementations
Trait Implementations
Returns the name of the header field.
Parse the header from a HTTP message.
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
Try to convert value to a HeaderValue.
Auto Trait Implementations
impl RefUnwindSafe for Date
impl UnwindSafe for Date
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
type Error = <T as TryIntoHeaderValue>::Error
pub fn try_into_pair(
self
) -> Result<(HeaderName, HeaderValue), <T as TryIntoHeaderPair>::Error>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more