xitca_service/middleware/
mod.rs

1//! utility middlewares that can be used together with [ServiceExt::enclosed].
2//!
3//! [ServiceExt::enclosed]: crate::service::ServiceExt::enclosed
4
5mod async_fn;
6mod group;
7mod map;
8mod unchecked_ready;
9
10pub use async_fn::AsyncFn;
11pub use group::Group;
12pub use unchecked_ready::UncheckedReady;
13
14pub(crate) use map::{Map, MapErr};
15
16use crate::pipeline::{PipelineT, marker::BuildEnclosed};
17
18/// Type alias for specialized [PipelineT] type.
19pub type EnclosedBuilder<F, S> = PipelineT<F, S, BuildEnclosed>;
20
21/// Type alias for specialized [PipelineT] type.
22pub type EnclosedFnBuilder<F, S> = EnclosedBuilder<F, AsyncFn<S>>;
23
24/// Type alias for specialized [PipelineT] type.
25pub type MapBuilder<F, S> = EnclosedBuilder<F, Map<S>>;
26
27/// Type alias for specialized [PipelineT] type.
28pub type MapErrorBuilder<F, S> = EnclosedBuilder<F, MapErr<S>>;