mirror of
https://github.com/actix/actix-web.git
synced 2025-03-28 13:55:28 +00:00
add Service impl for Box<S>
This commit is contained in:
parent
5f37d85f9b
commit
a60bf691d5
2 changed files with 29 additions and 0 deletions
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 a new issue