[−][src]Struct headers::Expires
Expires
header, defined in RFC7234
The Expires
header field gives the date/time after which the
response is considered stale.
The presence of an Expires field does not imply that the original resource will change or cease to exist at, before, or after that time.
ABNF
Expires = HTTP-date
Example values
Thu, 01 Dec 1994 16:00:00 GMT
Example
use headers::Expires; use std::time::{SystemTime, Duration}; let time = SystemTime::now() + Duration::from_secs(60 * 60 * 24); let expires = Expires::from(time);
Trait Implementations
impl Clone for Expires
[src]
impl Copy for Expires
[src]
impl Debug for Expires
[src]
impl Eq for Expires
[src]
impl From<SystemTime> for Expires
[src]
pub fn from(time: SystemTime) -> Expires
[src]
impl Hash for Expires
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Header for Expires
[src]
pub fn name() -> &'static HeaderName
[src]
pub fn decode<'i, I>(values: &mut I) -> Result<Self, Error> where
I: Iterator<Item = &'i HeaderValue>,
[src]
I: Iterator<Item = &'i HeaderValue>,
pub fn encode<E: Extend<HeaderValue>>(&self, values: &mut E)
[src]
impl Ord for Expires
[src]
pub fn cmp(&self, other: &Expires) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Expires> for Expires
[src]
impl PartialOrd<Expires> for Expires
[src]
pub fn partial_cmp(&self, other: &Expires) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Expires) -> bool
[src]
pub fn le(&self, other: &Expires) -> bool
[src]
pub fn gt(&self, other: &Expires) -> bool
[src]
pub fn ge(&self, other: &Expires) -> bool
[src]
impl StructuralEq for Expires
[src]
impl StructuralPartialEq for Expires
[src]
Auto Trait Implementations
impl RefUnwindSafe for Expires
[src]
impl Send for Expires
[src]
impl Sync for Expires
[src]
impl Unpin for Expires
[src]
impl UnwindSafe for Expires
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,