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 actori_http::Response;
use actori_http::http::header::Date;
use std::time::SystemTime;
let mut builder = Response::Ok();
builder.set(Date(SystemTime::now().into()));Tuple Fields§
§0: HttpDateImplementations§
Trait Implementations§
Source§impl Header for Date
impl Header for Date
Source§fn name() -> HeaderName
fn name() -> HeaderName
Returns the name of the header field
Source§fn parse<T>(msg: &T) -> Result<Self, ParseError>where
T: HttpMessage,
fn parse<T>(msg: &T) -> Result<Self, ParseError>where
T: HttpMessage,
Parse a header
Source§impl IntoHeaderValue for Date
impl IntoHeaderValue for Date
Source§type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more