Skip to content

Instantly share code, notes, and snippets.

@jimmycuadra
Created May 11, 2017 22:41
Show Gist options
  • Save jimmycuadra/313ac337c6413098c03345c9e7f6bc30 to your computer and use it in GitHub Desktop.
Save jimmycuadra/313ac337c6413098c03345c9e7f6bc30 to your computer and use it in GitHub Desktop.
[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"
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