Guest User

Untitled

a guest
Jan 15th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. pub trait DirectService<Request> {
  2. /// Responses given by the service.
  3. type Response;
  4.  
  5. /// Errors produced by servicing a request.
  6. type ResponseError;
  7.  
  8. /// Errors produced during attempts to drive the service.
  9. type ServiceError;
  10.  
  11. /// The future response value.
  12. type Future: Future<Item = Self::Response, Error = Self::ResponseError>;
  13.  
  14. fn poll_ready(&mut self) -> Poll<(), Self::ServiceError>;
  15.  
  16. fn poll_service(&mut self) -> Poll<(), Self::ServiceError>;
  17.  
  18. fn poll_close(&mut self) -> Poll<(), Self::ServiceError>;
  19.  
  20. fn call(&mut self, req: Request) -> Self::Future;
  21. }
Add Comment
Please, Sign In to add comment