[go: up one dir, main page]

tower 0.5.2

Tower is a library of modular and reusable components for building robust clients and servers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Spawns tasks to drive its inner service to readiness.
#[derive(Clone, Debug, Default)]
pub struct SpawnReadyLayer(());

impl SpawnReadyLayer {
    /// Builds a [`SpawnReadyLayer`].
    pub fn new() -> Self {
        Self::default()
    }
}

impl<S> tower_layer::Layer<S> for SpawnReadyLayer {
    type Service = super::SpawnReady<S>;

    fn layer(&self, service: S) -> Self::Service {
        super::SpawnReady::new(service)
    }
}