Struct rustful::header::LastModified [] [src]

pub struct LastModified(pub HttpDate);

Last-Modified header, defined in RFC7232

The Last-Modified header field in a response provides a timestamp indicating the date and time at which the origin server believes the selected representation was last modified, as determined at the conclusion of handling the request.

ABNF

Expires = HTTP-date

Example values

  • Sat, 29 Oct 1994 19:43:31 GMT

Example

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

Trait Implementations

impl PartialEq<LastModified> for LastModified

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

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

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

This method tests for !=.

impl Debug for LastModified

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

Formats the value using the given formatter.

impl Clone for LastModified

fn clone(&self) -> LastModified

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Deref for LastModified

type Target = HttpDate

The resulting type after dereferencing

fn deref(&'a self) -> &'a HttpDate

The method called to dereference a value

impl DerefMut for LastModified

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

The method called to mutably dereference a value

impl Header for LastModified

fn header_name() -> &'static str

Returns the name of the header field this belongs to. Read more

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

Parse a header from a raw stream of bytes. Read more

impl HeaderFormat for LastModified

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

Format a header to be output into a TcpStream. Read more

impl Display for LastModified

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

Formats the value using the given formatter.