Struct headers_ext::IfModifiedSince [−][src]
pub struct IfModifiedSince(_);
If-Modified-Since
header, defined in
RFC7232
The If-Modified-Since
header field makes a GET or HEAD request
method conditional on the selected representation's modification date
being more recent than the date provided in the field-value.
Transfer of the selected representation's data is avoided if that
data has not changed.
ABNF
If-Modified-Since = HTTP-date
Example values
Sat, 29 Oct 1994 19:43:31 GMT
Example
use headers::IfModifiedSince; use std::time::{Duration, SystemTime}; let time = SystemTime::now() - Duration::from_secs(60 * 60 * 24); let if_mod = IfModifiedSince::from(time);
Methods
impl IfModifiedSince
[src]
impl IfModifiedSince
pub fn is_modified(&self, last_modified: SystemTime) -> bool
[src]
pub fn is_modified(&self, last_modified: SystemTime) -> bool
Check if the supplied time means the resource has been modified.
Trait Implementations
impl Debug for IfModifiedSince
[src]
impl Debug for IfModifiedSince
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 IfModifiedSince
[src]
impl Clone for IfModifiedSince
fn clone(&self) -> IfModifiedSince
[src]
fn clone(&self) -> IfModifiedSince
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 IfModifiedSince
[src]
impl Copy for IfModifiedSince
impl PartialEq for IfModifiedSince
[src]
impl PartialEq for IfModifiedSince
fn eq(&self, other: &IfModifiedSince) -> bool
[src]
fn eq(&self, other: &IfModifiedSince) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IfModifiedSince) -> bool
[src]
fn ne(&self, other: &IfModifiedSince) -> bool
This method tests for !=
.
impl Eq for IfModifiedSince
[src]
impl Eq for IfModifiedSince
impl PartialOrd for IfModifiedSince
[src]
impl PartialOrd for IfModifiedSince
fn partial_cmp(&self, other: &IfModifiedSince) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &IfModifiedSince) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &IfModifiedSince) -> bool
[src]
fn lt(&self, other: &IfModifiedSince) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &IfModifiedSince) -> bool
[src]
fn le(&self, other: &IfModifiedSince) -> 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: &IfModifiedSince) -> bool
[src]
fn gt(&self, other: &IfModifiedSince) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &IfModifiedSince) -> bool
[src]
fn ge(&self, other: &IfModifiedSince) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for IfModifiedSince
[src]
impl Ord for IfModifiedSince
fn cmp(&self, other: &IfModifiedSince) -> Ordering
[src]
fn cmp(&self, other: &IfModifiedSince) -> 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 IfModifiedSince
[src]
impl Hash for IfModifiedSince
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 IfModifiedSince
[src]
impl From<SystemTime> for IfModifiedSince
fn from(time: SystemTime) -> IfModifiedSince
[src]
fn from(time: SystemTime) -> IfModifiedSince
Performs the conversion.
impl From<IfModifiedSince> for SystemTime
[src]
impl From<IfModifiedSince> for SystemTime
fn from(date: IfModifiedSince) -> SystemTime
[src]
fn from(date: IfModifiedSince) -> SystemTime
Performs the conversion.
Auto Trait Implementations
impl Send for IfModifiedSince
impl Send for IfModifiedSince
impl Sync for IfModifiedSince
impl Sync for IfModifiedSince