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]

Check if the supplied time passes the precondtion.

Trait Implementations

impl Debug for IfUnmodifiedSince
[src]

Formats the value using the given formatter. Read more

impl Clone for IfUnmodifiedSince
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for IfUnmodifiedSince
[src]

impl PartialEq for IfUnmodifiedSince
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for IfUnmodifiedSince
[src]

impl PartialOrd for IfUnmodifiedSince
[src]

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

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]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for IfUnmodifiedSince
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl From<SystemTime> for IfUnmodifiedSince
[src]

Performs the conversion.

impl From<IfUnmodifiedSince> for SystemTime
[src]

Performs the conversion.

Auto Trait Implementations