Created
May 11, 2017 22:41
-
-
Save jimmycuadra/313ac337c6413098c03345c9e7f6bc30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "ruma-client-test" | |
version = "0.1.0" | |
[dependencies] | |
futures = "0.1.13" | |
tokio-service = "0.1.0" | |
[dependencies.hyper] | |
git = "https://github.com/hyperium/hyper" | |
rev = "fed04dfb58e19b408322d4e5ca7474871e848a35" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate futures; | |
extern crate hyper; | |
extern crate tokio_service; | |
pub trait Endpoint { | |
type Request: Into<hyper::Request>; | |
type Response: From<hyper::Response>; | |
} | |
pub struct Client; | |
pub struct Error; | |
impl<E> tokio_service::Service for Client where E: Endpoint { | |
type Request = E::Request; | |
type Response = E::Response; | |
type Error = Error; | |
type Future = Box<futures::Future<Item = Self::Request, Error = Self::Error>>; | |
fn call(&self, req: Self::Request) -> Self::Future { | |
unimplemented!(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment