Expand description
ETag and conditional request types (RFC 7232).
ETag represents an HTTP entity tag with strong or weak variants.
IfMatch and IfNoneMatch model the corresponding conditional request
headers, supporting single values, multiple values, and the wildcard *.
§Example
use api_bones::etag::{ETag, IfMatch};
let tag = ETag::strong("abc123");
assert_eq!(tag.to_string(), "\"abc123\"");
let weak = ETag::weak("xyz");
assert_eq!(weak.to_string(), "W/\"xyz\"");
assert!(tag.matches(&ETag::strong("abc123")));
assert!(!tag.matches(&weak));Structs§
- ETag
- An HTTP entity tag as defined by RFC 7232 §2.3.
Enums§
- IfMatch
- Models the
If-Matchconditional request header (RFC 7232 §3.1). - IfNone
Match - Models the
If-None-Matchconditional request header (RFC 7232 §3.2).