diff --git a/tower/src/builder/mod.rs b/tower/src/builder/mod.rs index 62f617c..b2718c6 100644 --- a/tower/src/builder/mod.rs +++ b/tower/src/builder/mod.rs @@ -212,6 +212,11 @@ impl ServiceBuilder { self.layer(TimeoutLayer::new(timeout)) } + /// Obtains the underlying `Layer` implementation. + pub fn into_inner(self) -> L { + self.layer + } + /// Wrap the service `S` with the layers. pub fn service(self, service: S) -> L::Service where