Struct hyper::header::IfModifiedSince [] [src]

pub struct IfModifiedSince(pub HttpDate);

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-date

Example values

Example

// extern crate time;
 
use hyper::header::{Headers, IfModifiedSince, HttpDate};
use time::{self, Duration};
 
let mut headers = Headers::new();
headers.set(IfModifiedSince(HttpDate(time::now() - Duration::days(1))));

Trait Implementations

impl Deref for IfModifiedSince

type Target = HttpDate

fn deref(&self) -> &HttpDate

impl DerefMut for IfModifiedSince

fn deref_mut(&mut self) -> &mut HttpDate

impl Header for IfModifiedSince

fn header_name() -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Result<Self>

impl HeaderFormat for IfModifiedSince

fn fmt_header(&self, f: &mut Formatter) -> Result

impl Display for IfModifiedSince

fn fmt(&self, f: &mut Formatter) -> Result

impl Serialize for IfModifiedSince

fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer

impl Deserialize for IfModifiedSince

fn deserialize<D>(deserializer: &mut D) -> Result<IfModifiedSince, D::Error> where D: Deserializer

Derived Implementations

impl PartialEq for IfModifiedSince

fn eq(&self, __arg_0: &IfModifiedSince) -> bool

fn ne(&self, __arg_0: &IfModifiedSince) -> bool

impl Debug for IfModifiedSince

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for IfModifiedSince

fn clone(&self) -> IfModifiedSince

1.0.0fn clone_from(&mut self, source: &Self)