diff --git a/actix-service/src/lib.rs b/actix-service/src/lib.rs index 96bbf5b8..c0645c78 100644 --- a/actix-service/src/lib.rs +++ b/actix-service/src/lib.rs @@ -198,6 +198,24 @@ where } } +impl Service for RefCell +where + S: Service, +{ + type Request = S::Request; + type Response = S::Response; + type Error = S::Error; + type Future = S::Future; + + fn poll_ready(&mut self, ctx: &mut Context<'_>) -> Poll> { + self.borrow_mut().poll_ready(ctx) + } + + fn call(&mut self, request: Self::Request) -> S::Future { + self.borrow_mut().call(request) + } +} + impl Service for Rc> where S: Service,