Struct salvo::http::headers::IfModifiedSince [−][src]
pub struct IfModifiedSince(_);
Expand description
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);
Implementations
Check if the supplied time means the resource has been modified.
Trait Implementations
Performs the conversion.
The name of this header.
pub fn decode<'i, I>(values: &mut I) -> Result<IfModifiedSince, Error> where
I: Iterator<Item = &'i HeaderValue>,
pub fn decode<'i, I>(values: &mut I) -> Result<IfModifiedSince, Error> where
I: Iterator<Item = &'i HeaderValue>,
Decode this type from an iterator of HeaderValue
s.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for IfModifiedSince
impl Send for IfModifiedSince
impl Sync for IfModifiedSince
impl Unpin for IfModifiedSince
impl UnwindSafe for IfModifiedSince
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more