Struct trillium_http_types::conditional::IfMatch [−][src]
pub struct IfMatch { /* fields omitted */ }Expand description
Apply the HTTP method if the ETag matches.
Specifications
Examples
use http_types::Response; use http_types::conditional::{IfMatch, ETag}; let mut entries = IfMatch::new(); entries.push(ETag::new("0xcafebeef".to_string())); entries.push(ETag::new("0xbeefcafe".to_string())); let mut res = Response::new(200); res.insert_header(&entries, &entries); let entries = IfMatch::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.
Set the wildcard directive.
An iterator visiting all server entries.
Trait Implementations
Access the header’s name.
Access the header’s value.
Auto Trait Implementations
impl RefUnwindSafe for IfMatchimpl UnwindSafe for IfMatch