2019-12-04 17:31:27 -08:00
|
|
|
#![doc(html_root_url = "https://docs.rs/tower-buffer/0.3.0")]
|
2019-09-23 14:28:14 -07:00
|
|
|
#![warn(
|
|
|
|
missing_debug_implementations,
|
|
|
|
missing_docs,
|
|
|
|
rust_2018_idioms,
|
|
|
|
unreachable_pub
|
|
|
|
)]
|
2019-04-08 20:11:09 -07:00
|
|
|
#![allow(elided_lifetimes_in_paths)]
|
|
|
|
|
2017-10-10 10:38:40 -07:00
|
|
|
//! Buffer requests when the inner service is out of capacity.
|
|
|
|
//!
|
|
|
|
//! Buffering works by spawning a new task that is dedicated to pulling requests
|
|
|
|
//! out of the buffer and dispatching them to the inner service. By adding a
|
|
|
|
//! buffer and a dedicated task, the `Buffer` layer in front of the service can
|
|
|
|
//! be `Clone` even if the inner service is not.
|
|
|
|
|
2019-02-25 10:01:26 -08:00
|
|
|
pub mod error;
|
|
|
|
pub mod future;
|
2019-04-10 12:35:05 -07:00
|
|
|
mod layer;
|
2019-02-25 10:01:26 -08:00
|
|
|
mod message;
|
2019-04-10 12:35:05 -07:00
|
|
|
mod service;
|
2019-02-25 10:01:26 -08:00
|
|
|
mod worker;
|
|
|
|
|
2019-04-10 12:35:05 -07:00
|
|
|
pub use crate::layer::BufferLayer;
|
|
|
|
pub use crate::service::Buffer;
|