mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 18:02:58 +01:00
add Service impl for Box<S>
This commit is contained in:
parent
5f37d85f9b
commit
a60bf691d5
12
actix-service/CHANGES.md
Normal file
12
actix-service/CHANGES.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Changes
|
||||
|
||||
## [0.1.1] - 2018-12-09
|
||||
|
||||
### Added
|
||||
|
||||
* Added Service impl for Box<S: Service>
|
||||
|
||||
|
||||
## [0.1.0] - 2018-12-09
|
||||
|
||||
* Initial import
|
@ -280,6 +280,23 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<S, Request> Service<Request> for Box<S>
|
||||
where
|
||||
S: Service<Request> + ?Sized,
|
||||
{
|
||||
type Response = S::Response;
|
||||
type Error = S::Error;
|
||||
type Future = S::Future;
|
||||
|
||||
fn poll_ready(&mut self) -> Poll<(), S::Error> {
|
||||
(**self).poll_ready()
|
||||
}
|
||||
|
||||
fn call(&mut self, request: Request) -> S::Future {
|
||||
(**self).call(request)
|
||||
}
|
||||
}
|
||||
|
||||
impl<F, R, E, S, Request> NewService<Request> for F
|
||||
where
|
||||
F: Fn() -> R,
|
||||
|
Loading…
Reference in New Issue
Block a user