Struct http_types::conditional::Vary [−][src]
pub struct Vary { /* fields omitted */ }
Expand description
Apply the HTTP method if the ETag matches.
Specifications
Examples
use http_types::Response; use http_types::conditional::Vary; let mut entries = Vary::new(); entries.push("User-Agent")?; entries.push("Accept-Encoding")?; let mut res = Response::new(200); entries.apply(&mut res); let entries = Vary::from_headers(res)?.unwrap(); let mut entries = entries.iter(); assert_eq!(entries.next().unwrap(), "User-Agent"); assert_eq!(entries.next().unwrap(), "Accept-Encoding");
Implementations
Create a new instance from headers.
Get the HeaderName
.
Set the wildcard directive.
Get the HeaderValue
.
Push a directive into the list of entries.
Trait Implementations
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
.