Skip to content

Instantly share code, notes, and snippets.

@yaymukund
Created August 25, 2018 14:13
Show Gist options
  • Save yaymukund/b4f6fbd70bd650bf5cee4c736d14020b to your computer and use it in GitHub Desktop.
Save yaymukund/b4f6fbd70bd650bf5cee4c736d14020b to your computer and use it in GitHub Desktop.
use hyper::client::ResponseFuture;
use hyper::{Body, Response};
use tokio::prelude::IntoFuture;
struct Download {
future: ResponseFuture,
}
impl Download {
pub fn new(future: ResponseFuture) -> Download {
Download { future }
}
fn future(self) {
self.future.and_then();
}
}
// impl IntoFuture for Download {
// type Future = ResponseFuture;
// type Item = Response<Body>;
// type Error = ();
//
// fn into_future(self) {}
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment