From 8cdfa445d6629ffef4cb84967ff7017654045bc2 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 2 Jul 2025 18:36:06 -0600 Subject: chore: add vendor directory --- vendor/tower-layer/.cargo-checksum.json | 1 + vendor/tower-layer/CHANGELOG.md | 48 +++++ vendor/tower-layer/Cargo.toml | 41 ++++ vendor/tower-layer/LICENSE | 25 +++ vendor/tower-layer/README.md | 43 +++++ vendor/tower-layer/src/identity.rs | 37 ++++ vendor/tower-layer/src/layer_fn.rs | 114 +++++++++++ vendor/tower-layer/src/lib.rs | 112 +++++++++++ vendor/tower-layer/src/stack.rs | 62 ++++++ vendor/tower-layer/src/tuple.rs | 330 ++++++++++++++++++++++++++++++++ 10 files changed, 813 insertions(+) create mode 100644 vendor/tower-layer/.cargo-checksum.json create mode 100644 vendor/tower-layer/CHANGELOG.md create mode 100644 vendor/tower-layer/Cargo.toml create mode 100644 vendor/tower-layer/LICENSE create mode 100644 vendor/tower-layer/README.md create mode 100644 vendor/tower-layer/src/identity.rs create mode 100644 vendor/tower-layer/src/layer_fn.rs create mode 100644 vendor/tower-layer/src/lib.rs create mode 100644 vendor/tower-layer/src/stack.rs create mode 100644 vendor/tower-layer/src/tuple.rs (limited to 'vendor/tower-layer') diff --git a/vendor/tower-layer/.cargo-checksum.json b/vendor/tower-layer/.cargo-checksum.json new file mode 100644 index 00000000..79190233 --- /dev/null +++ b/vendor/tower-layer/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"CHANGELOG.md":"8e388c285cf1f52b986862cde65a188002d1d223ffa04ce28fb669fe935f61a9","Cargo.toml":"294873d3652f2c23fd4839dffec4edfc3372345a2dd2cec898da4a9fb0b0c1c5","LICENSE":"4249c8e6c5ebb85f97c77e6457c6fafc1066406eb8f1ef61e796fbdc5ff18482","README.md":"224c67c67c5cbdbfd6f46a0ef4833a09798c4edb7faffaf3c549bec7f4780173","src/identity.rs":"f52f535dd6fbe5da1e63da9cf6bbaaf16bb882da9008676570489b3bc6410673","src/layer_fn.rs":"bee7fb3ad2d016fea7fd47b298677b74d30cd459f019fa2d74940a6cc2237ddb","src/lib.rs":"4124a66bc533f64d67b44e98d1782104aa85b85a64638ab42f94319a0ff00812","src/stack.rs":"572ccc3b4d1111db007b7a573f31ac03efbd9b07ef8fec8d16ee34e9da299124","src/tuple.rs":"420dc53fbde5a4c213a2a70bce6ae755953b7fbddd1e895d6f4d62e2591ae466"},"package":"121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"} \ No newline at end of file diff --git a/vendor/tower-layer/CHANGELOG.md b/vendor/tower-layer/CHANGELOG.md new file mode 100644 index 00000000..1ca7a54b --- /dev/null +++ b/vendor/tower-layer/CHANGELOG.md @@ -0,0 +1,48 @@ +# 0.3.3 (August 1, 2024) + +### Added + +- **builder,util**: add convenience methods for boxing services ([#616]) +- **all**: new functions const when possible ([#760]) + +[#616]: https://github.com/tower-rs/tower/pull/616 +[#760]: https://github.com/tower-rs/tower/pull/760 + +# 0.3.2 (Octpber 10, 2022) + +## Added + +- Implement `Layer` for tuples of up to 16 elements ([#694]) + +[#694]: https://github.com/tower-rs/tower/pull/694 + +# 0.3.1 (January 7, 2021) + +### Added + +- Added `layer_fn`, for constructing a `Layer` from a function taking + a `Service` and returning a different `Service` ([#491]) +- Added an implementation of `Layer` for `&Layer` ([#446]) +- Multiple documentation improvements ([#487], [#490]) + +[#491]: https://github.com/tower-rs/tower/pull/491 +[#446]: https://github.com/tower-rs/tower/pull/446 +[#487]: https://github.com/tower-rs/tower/pull/487 +[#490]: https://github.com/tower-rs/tower/pull/490 + +# 0.3.0 (November 29, 2019) + +- Move layer builder from `tower-util` to tower-layer. + +# 0.3.0-alpha.2 (September 30, 2019) + +- Move to `futures-*-preview 0.3.0-alpha.19` +- Move to `pin-project 0.4` + +# 0.3.0-alpha.1 (September 11, 2019) + +- Move to `std::future` + +# 0.1.0 (April 26, 2019) + +- Initial release diff --git a/vendor/tower-layer/Cargo.toml b/vendor/tower-layer/Cargo.toml new file mode 100644 index 00000000..b8b9d75e --- /dev/null +++ b/vendor/tower-layer/Cargo.toml @@ -0,0 +1,41 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2018" +name = "tower-layer" +version = "0.3.3" +authors = ["Tower Maintainers "] +build = false +autobins = false +autoexamples = false +autotests = false +autobenches = false +description = """ +Decorates a `Service` to allow easy composition between `Service`s. +""" +homepage = "https://github.com/tower-rs/tower" +documentation = "https://docs.rs/tower-layer/0.3.3" +readme = "README.md" +categories = [ + "asynchronous", + "network-programming", +] +license = "MIT" +repository = "https://github.com/tower-rs/tower" + +[lib] +name = "tower_layer" +path = "src/lib.rs" + +[dependencies] + +[dev-dependencies] diff --git a/vendor/tower-layer/LICENSE b/vendor/tower-layer/LICENSE new file mode 100644 index 00000000..b980cacc --- /dev/null +++ b/vendor/tower-layer/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2019 Tower Contributors + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/vendor/tower-layer/README.md b/vendor/tower-layer/README.md new file mode 100644 index 00000000..48f9dbb7 --- /dev/null +++ b/vendor/tower-layer/README.md @@ -0,0 +1,43 @@ +# Tower Layer + +Decorates a [Tower] `Service`, transforming either the request or the response. + +[![Crates.io][crates-badge]][crates-url] +[![Documentation][docs-badge]][docs-url] +[![Documentation (master)][docs-master-badge]][docs-master-url] +[![MIT licensed][mit-badge]][mit-url] +[![Build Status][actions-badge]][actions-url] +[![Discord chat][discord-badge]][discord-url] + +[crates-badge]: https://img.shields.io/crates/v/tower-layer.svg +[crates-url]: https://crates.io/crates/tower-layer +[docs-badge]: https://docs.rs/tower-layer/badge.svg +[docs-url]: https://docs.rs/tower-layer +[docs-master-badge]: https://img.shields.io/badge/docs-master-blue +[docs-master-url]: https://tower-rs.github.io/tower/tower_layer +[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg +[mit-url]: LICENSE +[actions-badge]: https://github.com/tower-rs/tower/workflows/CI/badge.svg +[actions-url]:https://github.com/tower-rs/tower/actions?query=workflow%3ACI +[discord-badge]: https://img.shields.io/discord/500028886025895936?logo=discord&label=discord&logoColor=white +[discord-url]: https://discord.gg/EeF3cQw + +## Overview + +Often, many of the pieces needed for writing network applications can be +reused across multiple services. The `Layer` trait can be used to write +reusable components that can be applied to very different kinds of services; +for example, it can be applied to services operating on different protocols, +and to both the client and server side of a network transaction. + +## License + +This project is licensed under the [MIT license](LICENSE). + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in Tower by you, shall be licensed as MIT, without any additional +terms or conditions. + +[Tower]: https://crates.io/crates/tower \ No newline at end of file diff --git a/vendor/tower-layer/src/identity.rs b/vendor/tower-layer/src/identity.rs new file mode 100644 index 00000000..5233a1d8 --- /dev/null +++ b/vendor/tower-layer/src/identity.rs @@ -0,0 +1,37 @@ +use super::Layer; +use std::fmt; + +/// A no-op middleware. +/// +/// When wrapping a [`Service`], the [`Identity`] layer returns the provided +/// service without modifying it. +/// +/// [`Service`]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html +#[derive(Default, Clone)] +pub struct Identity { + _p: (), +} + +impl Identity { + /// Create a new [`Identity`] value + pub const fn new() -> Identity { + Identity { _p: () } + } +} + +/// Decorates a [`Service`], transforming either the request or the response. +/// +/// [`Service`]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html +impl Layer for Identity { + type Service = S; + + fn layer(&self, inner: S) -> Self::Service { + inner + } +} + +impl fmt::Debug for Identity { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Identity").finish() + } +} diff --git a/vendor/tower-layer/src/layer_fn.rs b/vendor/tower-layer/src/layer_fn.rs new file mode 100644 index 00000000..06f6e0e3 --- /dev/null +++ b/vendor/tower-layer/src/layer_fn.rs @@ -0,0 +1,114 @@ +use super::Layer; +use std::fmt; + +/// Returns a new [`LayerFn`] that implements [`Layer`] by calling the +/// given function. +/// +/// The [`Layer::layer`] method takes a type implementing [`Service`] and +/// returns a different type implementing [`Service`]. In many cases, this can +/// be implemented by a function or a closure. The [`LayerFn`] helper allows +/// writing simple [`Layer`] implementations without needing the boilerplate of +/// a new struct implementing [`Layer`]. +/// +/// # Example +/// ```rust +/// # use tower::Service; +/// # use std::task::{Poll, Context}; +/// # use tower_layer::{Layer, layer_fn}; +/// # use std::fmt; +/// # use std::convert::Infallible; +/// # +/// // A middleware that logs requests before forwarding them to another service +/// pub struct LogService { +/// target: &'static str, +/// service: S, +/// } +/// +/// impl Service for LogService +/// where +/// S: Service, +/// Request: fmt::Debug, +/// { +/// type Response = S::Response; +/// type Error = S::Error; +/// type Future = S::Future; +/// +/// fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { +/// self.service.poll_ready(cx) +/// } +/// +/// fn call(&mut self, request: Request) -> Self::Future { +/// // Log the request +/// println!("request = {:?}, target = {:?}", request, self.target); +/// +/// self.service.call(request) +/// } +/// } +/// +/// // A `Layer` that wraps services in `LogService` +/// let log_layer = layer_fn(|service| { +/// LogService { +/// service, +/// target: "tower-docs", +/// } +/// }); +/// +/// // An example service. This one uppercases strings +/// let uppercase_service = tower::service_fn(|request: String| async move { +/// Ok::<_, Infallible>(request.to_uppercase()) +/// }); +/// +/// // Wrap our service in a `LogService` so requests are logged. +/// let wrapped_service = log_layer.layer(uppercase_service); +/// ``` +/// +/// [`Service`]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html +/// [`Layer::layer`]: crate::Layer::layer +pub fn layer_fn(f: T) -> LayerFn { + LayerFn { f } +} + +/// A `Layer` implemented by a closure. See the docs for [`layer_fn`] for more details. +#[derive(Clone, Copy)] +pub struct LayerFn { + f: F, +} + +impl Layer for LayerFn +where + F: Fn(S) -> Out, +{ + type Service = Out; + + fn layer(&self, inner: S) -> Self::Service { + (self.f)(inner) + } +} + +impl fmt::Debug for LayerFn { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("LayerFn") + .field("f", &format_args!("{}", std::any::type_name::())) + .finish() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[allow(dead_code)] + #[test] + fn layer_fn_has_useful_debug_impl() { + struct WrappedService { + inner: S, + } + let layer = layer_fn(|svc| WrappedService { inner: svc }); + let _svc = layer.layer("foo"); + + assert_eq!( + "LayerFn { f: tower_layer::layer_fn::tests::layer_fn_has_useful_debug_impl::{{closure}} }".to_string(), + format!("{:?}", layer), + ); + } +} diff --git a/vendor/tower-layer/src/lib.rs b/vendor/tower-layer/src/lib.rs new file mode 100644 index 00000000..4823fcc1 --- /dev/null +++ b/vendor/tower-layer/src/lib.rs @@ -0,0 +1,112 @@ +#![warn( + missing_debug_implementations, + missing_docs, + rust_2018_idioms, + unreachable_pub +)] +#![forbid(unsafe_code)] +// `rustdoc::broken_intra_doc_links` is checked on CI + +//! Layer traits and extensions. +//! +//! A layer decorates an service and provides additional functionality. It +//! allows other services to be composed with the service that implements layer. +//! +//! A middleware implements the [`Layer`] and [`Service`] trait. +//! +//! [`Service`]: https://docs.rs/tower/*/tower/trait.Service.html + +mod identity; +mod layer_fn; +mod stack; +mod tuple; + +pub use self::{ + identity::Identity, + layer_fn::{layer_fn, LayerFn}, + stack::Stack, +}; + +/// Decorates a [`Service`], transforming either the request or the response. +/// +/// Often, many of the pieces needed for writing network applications can be +/// reused across multiple services. The `Layer` trait can be used to write +/// reusable components that can be applied to very different kinds of services; +/// for example, it can be applied to services operating on different protocols, +/// and to both the client and server side of a network transaction. +/// +/// # Log +/// +/// Take request logging as an example: +/// +/// ```rust +/// # use tower_service::Service; +/// # use std::task::{Poll, Context}; +/// # use tower_layer::Layer; +/// # use std::fmt; +/// +/// pub struct LogLayer { +/// target: &'static str, +/// } +/// +/// impl Layer for LogLayer { +/// type Service = LogService; +/// +/// fn layer(&self, service: S) -> Self::Service { +/// LogService { +/// target: self.target, +/// service +/// } +/// } +/// } +/// +/// // This service implements the Log behavior +/// pub struct LogService { +/// target: &'static str, +/// service: S, +/// } +/// +/// impl Service for LogService +/// where +/// S: Service, +/// Request: fmt::Debug, +/// { +/// type Response = S::Response; +/// type Error = S::Error; +/// type Future = S::Future; +/// +/// fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { +/// self.service.poll_ready(cx) +/// } +/// +/// fn call(&mut self, request: Request) -> Self::Future { +/// // Insert log statement here or other functionality +/// println!("request = {:?}, target = {:?}", request, self.target); +/// self.service.call(request) +/// } +/// } +/// ``` +/// +/// The above log implementation is decoupled from the underlying protocol and +/// is also decoupled from client or server concerns. In other words, the same +/// log middleware could be used in either a client or a server. +/// +/// [`Service`]: https://docs.rs/tower/*/tower/trait.Service.html +pub trait Layer { + /// The wrapped service + type Service; + /// Wrap the given service with the middleware, returning a new service + /// that has been decorated with the middleware. + fn layer(&self, inner: S) -> Self::Service; +} + +impl<'a, T, S> Layer for &'a T +where + T: ?Sized + Layer, +{ + type Service = T::Service; + + fn layer(&self, inner: S) -> Self::Service { + (**self).layer(inner) + } +} diff --git a/vendor/tower-layer/src/stack.rs b/vendor/tower-layer/src/stack.rs new file mode 100644 index 00000000..cb6bac7b --- /dev/null +++ b/vendor/tower-layer/src/stack.rs @@ -0,0 +1,62 @@ +use super::Layer; +use std::fmt; + +/// Two middlewares chained together. +#[derive(Clone)] +pub struct Stack { + inner: Inner, + outer: Outer, +} + +impl Stack { + /// Create a new `Stack`. + pub const fn new(inner: Inner, outer: Outer) -> Self { + Stack { inner, outer } + } +} + +impl Layer for Stack +where + Inner: Layer, + Outer: Layer, +{ + type Service = Outer::Service; + + fn layer(&self, service: S) -> Self::Service { + let inner = self.inner.layer(service); + + self.outer.layer(inner) + } +} + +impl fmt::Debug for Stack +where + Inner: fmt::Debug, + Outer: fmt::Debug, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // The generated output of nested `Stack`s is very noisy and makes + // it harder to understand what is in a `ServiceBuilder`. + // + // Instead, this output is designed assuming that a `Stack` is + // usually quite nested, and inside a `ServiceBuilder`. Therefore, + // this skips using `f.debug_struct()`, since each one would force + // a new layer of indentation. + // + // - In compact mode, a nested stack ends up just looking like a flat + // list of layers. + // + // - In pretty mode, while a newline is inserted between each layer, + // the `DebugStruct` used in the `ServiceBuilder` will inject padding + // to that each line is at the same indentation level. + // + // Also, the order of [outer, inner] is important, since it reflects + // the order that the layers were added to the stack. + if f.alternate() { + // pretty + write!(f, "{:#?},\n{:#?}", self.outer, self.inner) + } else { + write!(f, "{:?}, {:?}", self.outer, self.inner) + } + } +} diff --git a/vendor/tower-layer/src/tuple.rs b/vendor/tower-layer/src/tuple.rs new file mode 100644 index 00000000..14b973ab --- /dev/null +++ b/vendor/tower-layer/src/tuple.rs @@ -0,0 +1,330 @@ +use crate::Layer; + +impl Layer for () { + type Service = S; + + fn layer(&self, service: S) -> Self::Service { + service + } +} + +impl Layer for (L1,) +where + L1: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1,) = self; + l1.layer(service) + } +} + +impl Layer for (L1, L2) +where + L1: Layer, + L2: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2) = self; + l1.layer(l2.layer(service)) + } +} + +impl Layer for (L1, L2, L3) +where + L1: Layer, + L2: Layer, + L3: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3) = self; + l1.layer((l2, l3).layer(service)) + } +} + +impl Layer for (L1, L2, L3, L4) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4) = self; + l1.layer((l2, l3, l4).layer(service)) + } +} + +impl Layer for (L1, L2, L3, L4, L5) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5) = self; + l1.layer((l2, l3, l4, l5).layer(service)) + } +} + +impl Layer for (L1, L2, L3, L4, L5, L6) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6) = self; + l1.layer((l2, l3, l4, l5, l6).layer(service)) + } +} + +impl Layer for (L1, L2, L3, L4, L5, L6, L7) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7) = self; + l1.layer((l2, l3, l4, l5, l6, l7).layer(service)) + } +} + +impl Layer for (L1, L2, L3, L4, L5, L6, L7, L8) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8).layer(service)) + } +} + +impl Layer for (L1, L2, L3, L4, L5, L6, L7, L8, L9) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9).layer(service)) + } +} + +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10).layer(service)) + } +} + +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, + L11: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10, l11).layer(service)) + } +} + +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, + L11: Layer, + L12: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12).layer(service)) + } +} + +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, + L11: Layer, + L12: Layer, + L13: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13).layer(service)) + } +} + +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, + L11: Layer, + L12: Layer, + L13: Layer, + L14: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14).layer(service)) + } +} + +#[rustfmt::skip] +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14, L15) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, + L11: Layer, + L12: Layer, + L13: Layer, + L14: Layer, + L15: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15).layer(service)) + } +} + +#[rustfmt::skip] +impl Layer + for (L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14, L15, L16) +where + L1: Layer, + L2: Layer, + L3: Layer, + L4: Layer, + L5: Layer, + L6: Layer, + L7: Layer, + L8: Layer, + L9: Layer, + L10: Layer, + L11: Layer, + L12: Layer, + L13: Layer, + L14: Layer, + L15: Layer, + L16: Layer, +{ + type Service = L1::Service; + + fn layer(&self, service: S) -> Self::Service { + let (l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16) = self; + l1.layer((l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16).layer(service)) + } +} -- cgit v1.2.3