mirror of
https://github.com/tower-rs/tower.git
synced 2025-09-30 22:41:17 +00:00
builder: Implement Layer
for ServiceBuilder
(#600)
This commit is contained in:
parent
3a134ba08a
commit
d91c0f5ba3
@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
# Unreleased
|
||||
|
||||
Nothing yet.
|
||||
- **builder**: Implement `Layer` for `ServiceBuilder`.
|
||||
|
||||
# 0.4.8 (May 28, 2021)
|
||||
|
||||
|
@ -673,3 +673,14 @@ impl<L: fmt::Debug> fmt::Debug for ServiceBuilder<L> {
|
||||
f.debug_tuple("ServiceBuilder").field(&self.layer).finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<S, L> Layer<S> for ServiceBuilder<L>
|
||||
where
|
||||
L: Layer<S>,
|
||||
{
|
||||
type Service = L::Service;
|
||||
|
||||
fn layer(&self, inner: S) -> Self::Service {
|
||||
self.layer.layer(inner)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user