Skip to content

Commit c3e009e

Browse files
authored
feat: add ETag::is_weak (#228)
1 parent e900f04 commit c3e009e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/common/etag.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ impl ETag {
4444
pub(crate) fn from_static(src: &'static str) -> ETag {
4545
ETag(EntityTag::from_static(src))
4646
}
47+
48+
/// Returns `true` if the etag is [weak](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag#directives).
49+
pub fn is_weak(&self) -> bool {
50+
self.0.is_weak()
51+
}
4752
}
4853

4954
error_type!(InvalidETag);

0 commit comments

Comments
 (0)