Struct http_types::cache::Age [−][src]
pub struct Age { /* fields omitted */ }
Expand description
HTTP Age
header
Specifications
Examples
use http_types::Response; use http_types::cache::Age; let age = Age::from_secs(12); let mut res = Response::new(200); age.apply(&mut res); let age = Age::from_headers(res)?.unwrap(); assert_eq!(age, Age::from_secs(12));
Implementations
Create an instance of Age
from a Headers
instance.
Insert a HeaderName
+ HeaderValue
pair into a Headers
instance.
Get the HeaderName
.
Get the HeaderValue
.
Trait Implementations
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
type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
Converts this object to an iterator of resolved HeaderValues
.