mirror of
https://github.com/fafhrd91/actix-net
synced 2025-02-22 06:03:18 +01:00
add Service impl for RefCell<S>
This commit is contained in:
parent
5b74c79cf9
commit
3105cde168
@ -198,6 +198,24 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<S> Service for RefCell<S>
|
||||||
|
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<Result<(), Self::Error>> {
|
||||||
|
self.borrow_mut().poll_ready(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn call(&mut self, request: Self::Request) -> S::Future {
|
||||||
|
self.borrow_mut().call(request)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<S> Service for Rc<RefCell<S>>
|
impl<S> Service for Rc<RefCell<S>>
|
||||||
where
|
where
|
||||||
S: Service,
|
S: Service,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user