Struct actix_web::http::header::Date [−][src]
pub struct Date(pub HttpDate);
Expand description
Date
header, defined in RFC7231
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 actix_http::Response;
use actix_http::http::header::Date;
use std::time::SystemTime;
let mut builder = Response::Ok();
builder.set(Date(SystemTime::now().into()));
Tuple Fields
0: HttpDate
Implementations
Trait Implementations
Returns the name of the header field
Parse a header
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
Try to convert value to a Header value.
Auto Trait Implementations
impl RefUnwindSafe for Date
impl UnwindSafe for Date
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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