diff --git a/tower/src/retry/mod.rs b/tower/src/retry/mod.rs index e369dbb..bbbc64e 100644 --- a/tower/src/retry/mod.rs +++ b/tower/src/retry/mod.rs @@ -31,6 +31,21 @@ impl
Retry
{ pub fn new(policy: P, service: S) -> Self { Retry { policy, service } } + + /// Get a reference to the inner service + pub fn get_ref(&self) -> &S { + &self.service + } + + /// Get a mutable reference to the inner service + pub fn get_mut(&mut self) -> &mut S { + &mut self.service + } + + /// Consume `self`, returning the inner service + pub fn into_inner(self) -> S { + self.service + } } impl
Service
diff --git a/tower/src/timeout/mod.rs b/tower/src/timeout/mod.rs
index 1a3e04b..ac5ae93 100644
--- a/tower/src/timeout/mod.rs
+++ b/tower/src/timeout/mod.rs
@@ -28,6 +28,21 @@ impl Service