Struct actix_http::http::header::IfModifiedSince
source · [−]pub struct IfModifiedSince(pub HttpDate);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-Unmodified-Since = HTTP-dateExample values
Sat, 29 Oct 1994 19:43:31 GMT
Example
use actix_http::Response;
use actix_http::http::header::IfModifiedSince;
use std::time::{SystemTime, Duration};
let mut builder = Response::Ok();
let modified = SystemTime::now() - Duration::from_secs(60 * 60 * 24);
builder.set(IfModifiedSince(modified.into()));Tuple Fields
0: HttpDateTrait Implementations
Returns the name of the header field
Parse a header
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
Try to convert value to a Header value.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
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
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
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
