pub struct IfUnmodifiedSince(_);
Expand description
If-Unmodified-Since
header, defined in
RFC7232
The If-Unmodified-Since
header field makes the request method
conditional on the selected representation’s last modification date
being earlier than or equal to the date provided in the field-value.
This field accomplishes the same purpose as If-Match for cases where
the user agent does not have an entity-tag for the representation.
ABNF
If-Unmodified-Since = HTTP-date
Example values
Sat, 29 Oct 1994 19:43:31 GMT
Example
use headers::IfUnmodifiedSince;
use std::time::{SystemTime, Duration};
let time = SystemTime::now() - Duration::from_secs(60 * 60 * 24);
let if_unmod = IfUnmodifiedSince::from(time);
Implementations
sourceimpl IfUnmodifiedSince
impl IfUnmodifiedSince
sourcepub fn precondition_passes(&self, last_modified: SystemTime) -> bool
pub fn precondition_passes(&self, last_modified: SystemTime) -> bool
Check if the supplied time passes the precondtion.
Trait Implementations
sourceimpl Clone for IfUnmodifiedSince
impl Clone for IfUnmodifiedSince
sourcefn clone(&self) -> IfUnmodifiedSince
fn clone(&self) -> IfUnmodifiedSince
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for IfUnmodifiedSince
impl Debug for IfUnmodifiedSince
sourceimpl From<SystemTime> for IfUnmodifiedSince
impl From<SystemTime> for IfUnmodifiedSince
sourcefn from(time: SystemTime) -> IfUnmodifiedSince
fn from(time: SystemTime) -> IfUnmodifiedSince
Converts to this type from the input type.
sourceimpl Hash for IfUnmodifiedSince
impl Hash for IfUnmodifiedSince
sourceimpl Header for IfUnmodifiedSince
impl Header for IfUnmodifiedSince
sourcefn name() -> &'static HeaderName
fn name() -> &'static HeaderName
The name of this header.
sourcefn decode<'i, I>(values: &mut I) -> Result<IfUnmodifiedSince, Error>where
I: Iterator<Item = &'i HeaderValue>,
fn decode<'i, I>(values: &mut I) -> Result<IfUnmodifiedSince, Error>where
I: Iterator<Item = &'i HeaderValue>,
Decode this type from an iterator of
HeaderValue
s.sourceimpl Ord for IfUnmodifiedSince
impl Ord for IfUnmodifiedSince
sourcefn cmp(&self, other: &IfUnmodifiedSince) -> Ordering
fn cmp(&self, other: &IfUnmodifiedSince) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<IfUnmodifiedSince> for IfUnmodifiedSince
impl PartialEq<IfUnmodifiedSince> for IfUnmodifiedSince
sourcefn eq(&self, other: &IfUnmodifiedSince) -> bool
fn eq(&self, other: &IfUnmodifiedSince) -> bool
sourceimpl PartialOrd<IfUnmodifiedSince> for IfUnmodifiedSince
impl PartialOrd<IfUnmodifiedSince> for IfUnmodifiedSince
sourcefn partial_cmp(&self, other: &IfUnmodifiedSince) -> Option<Ordering>
fn partial_cmp(&self, other: &IfUnmodifiedSince) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 IfUnmodifiedSince
impl Eq for IfUnmodifiedSince
impl StructuralEq for IfUnmodifiedSince
impl StructuralPartialEq for IfUnmodifiedSince
Auto Trait Implementations
impl RefUnwindSafe for IfUnmodifiedSince
impl Send for IfUnmodifiedSince
impl Sync for IfUnmodifiedSince
impl Unpin for IfUnmodifiedSince
impl UnwindSafe for IfUnmodifiedSince
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
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.