Struct http_types::conditional::IfNoneMatch [−][src]
pub struct IfNoneMatch { /* fields omitted */ }
Expand description
Apply the HTTP method if the ETags do not match.
This is used to update caches or to prevent uploading a new resource when one already exists.
Specifications
Examples
use http_types::Response; use http_types::conditional::{IfNoneMatch, ETag}; let mut entries = IfNoneMatch::new(); entries.push(ETag::new("0xcafebeef".to_string())); entries.push(ETag::new("0xbeefcafe".to_string())); let mut res = Response::new(200); entries.apply(&mut res); let entries = IfNoneMatch::from_headers(res)?.unwrap(); let mut entries = entries.iter(); assert_eq!(entries.next().unwrap(), &ETag::new("0xcafebeef".to_string())); assert_eq!(entries.next().unwrap(), &ETag::new("0xbeefcafe".to_string()));
Implementations
Create a new instance from headers.
Get the HeaderName
.
Get the HeaderValue
.
Set the wildcard directive.
An iterator visiting all server 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
.