Struct headers_ext::IfUnmodifiedSince [−][src]
pub struct IfUnmodifiedSince(_);
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);
Methods
impl IfUnmodifiedSince
[src]
impl IfUnmodifiedSince
pub fn precondition_passes(&self, last_modified: SystemTime) -> bool
[src]
pub fn precondition_passes(&self, last_modified: SystemTime) -> bool
Check if the supplied time passes the precondtion.
Trait Implementations
impl Debug for IfUnmodifiedSince
[src]
impl Debug for IfUnmodifiedSince
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for IfUnmodifiedSince
[src]
impl Clone for IfUnmodifiedSince
fn clone(&self) -> IfUnmodifiedSince
[src]
fn clone(&self) -> IfUnmodifiedSince
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for IfUnmodifiedSince
[src]
impl Copy for IfUnmodifiedSince
impl PartialEq for IfUnmodifiedSince
[src]
impl PartialEq for IfUnmodifiedSince
fn eq(&self, other: &IfUnmodifiedSince) -> bool
[src]
fn eq(&self, other: &IfUnmodifiedSince) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IfUnmodifiedSince) -> bool
[src]
fn ne(&self, other: &IfUnmodifiedSince) -> bool
This method tests for !=
.
impl Eq for IfUnmodifiedSince
[src]
impl Eq for IfUnmodifiedSince
impl PartialOrd for IfUnmodifiedSince
[src]
impl PartialOrd for IfUnmodifiedSince
fn partial_cmp(&self, other: &IfUnmodifiedSince) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &IfUnmodifiedSince) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &IfUnmodifiedSince) -> bool
[src]
fn lt(&self, other: &IfUnmodifiedSince) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &IfUnmodifiedSince) -> bool
[src]
fn le(&self, other: &IfUnmodifiedSince) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &IfUnmodifiedSince) -> bool
[src]
fn gt(&self, other: &IfUnmodifiedSince) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &IfUnmodifiedSince) -> bool
[src]
fn ge(&self, other: &IfUnmodifiedSince) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for IfUnmodifiedSince
[src]
impl Ord for IfUnmodifiedSince
fn cmp(&self, other: &IfUnmodifiedSince) -> Ordering
[src]
fn cmp(&self, other: &IfUnmodifiedSince) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for IfUnmodifiedSince
[src]
impl Hash for IfUnmodifiedSince
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<SystemTime> for IfUnmodifiedSince
[src]
impl From<SystemTime> for IfUnmodifiedSince
fn from(time: SystemTime) -> IfUnmodifiedSince
[src]
fn from(time: SystemTime) -> IfUnmodifiedSince
Performs the conversion.
impl From<IfUnmodifiedSince> for SystemTime
[src]
impl From<IfUnmodifiedSince> for SystemTime
fn from(date: IfUnmodifiedSince) -> SystemTime
[src]
fn from(date: IfUnmodifiedSince) -> SystemTime
Performs the conversion.
Auto Trait Implementations
impl Send for IfUnmodifiedSince
impl Send for IfUnmodifiedSince
impl Sync for IfUnmodifiedSince
impl Sync for IfUnmodifiedSince