layered 0.3.3

Build composable async services with layered middleware.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/// Builds a service from a tuple of layers and a root service.
///
/// Automatically implemented for tuples of layers with a service at the end,
/// supporting up to 16 elements. Layers apply outer to inner.
pub trait Stack {
    /// The type of service produced by this builder.
    type Service;

    /// Builds the composed service with all layers applied.
    fn into_service(self) -> Self::Service;
}