Struct headers_ext::Date
source · pub struct Date(_);
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 headers::Date;
use std::time::SystemTime;
let date = Date::from(SystemTime::now());
Trait Implementations
sourceimpl From<Date> for SystemTime
impl From<Date> for SystemTime
sourcefn from(date: Date) -> SystemTime
fn from(date: Date) -> SystemTime
Converts to this type from the input type.
sourceimpl From<SystemTime> for Date
impl From<SystemTime> for Date
sourcefn from(time: SystemTime) -> Date
fn from(time: SystemTime) -> Date
Converts to this type from the input type.
sourceimpl Header for Date
impl Header for Date
sourceconst NAME: &'static HeaderName = _
const NAME: &'static HeaderName = _
The name of this header.
sourceimpl Ord for Date
impl Ord for Date
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
sourcefn partial_cmp(&self, other: &Date) -> Option<Ordering>
fn partial_cmp(&self, other: &Date) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Date
impl Eq for Date
impl StructuralEq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more