tower_buffer/lib.rs
1#![doc(html_root_url = "https://docs.rs/tower-buffer/0.3.0")]
2#![warn(
3 missing_debug_implementations,
4 missing_docs,
5 rust_2018_idioms,
6 unreachable_pub
7)]
8#![allow(elided_lifetimes_in_paths)]
9
10//! Buffer requests when the inner service is out of capacity.
11//!
12//! Buffering works by spawning a new task that is dedicated to pulling requests
13//! out of the buffer and dispatching them to the inner service. By adding a
14//! buffer and a dedicated task, the `Buffer` layer in front of the service can
15//! be `Clone` even if the inner service is not.
16
17pub mod error;
18pub mod future;
19mod layer;
20mod message;
21mod service;
22mod worker;
23
24pub use crate::layer::BufferLayer;
25pub use crate::service::Buffer;