Skip to content

Commit 55bb472

Browse files
committed
new conditional submodule for etag
1 parent 4272252 commit 55bb472

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

src/cache/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
//! # Further Reading
88
//!
99
//! - [MDN: HTTP Caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching)
10-
//! - [MDN: HTTP Conditional Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests)
1110
1211
mod cache_control;
13-
mod etag;
1412

1513
pub use cache_control::CacheControl;
1614
pub use cache_control::CacheDirective;
17-
pub use etag::ETag;

src/cache/etag.rs renamed to src/conditional/etag.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::option;
1919
/// # fn main() -> http_types::Result<()> {
2020
/// #
2121
/// use http_types::Response;
22-
/// use http_types::cache::ETag;
22+
/// use http_types::conditional::ETag;
2323
///
2424
/// let etag = ETag::new("0xcafebeef".to_string());
2525
///

src/conditional/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//! HTTP conditional headers.
2+
//!
3+
//! Web page performance can be significantly improved by caching resources.
4+
//! This submodule includes headers and types to communicate how and when to
5+
//! cache resources.
6+
//!
7+
//! # Further Reading
8+
//!
9+
//! - [MDN: HTTP Conditional Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests)
10+
11+
mod etag;
12+
13+
pub use etag::ETag;

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ pub mod url {
118118
mod utils;
119119

120120
pub mod cache;
121+
pub mod conditional;
121122
pub mod headers;
122123
pub mod mime;
123124

0 commit comments

Comments
 (0)