areq 0.1.0-alpha5

Async runtime-agnostic HTTP requests
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::proto::{Error, Handshake};

pub trait HandshakeWith<I, B>:
    Handshake<I, B, handshake(..): Future<Output = Result<(Self::Client, Self::Task), Error>>>
{
    type Task: Future<Output = ()>;
}

impl<H, I, B, T> HandshakeWith<I, B> for H
where
    H: Handshake<I, B, handshake(..): Future<Output = Result<(Self::Client, T), Error>>>,
    T: Future<Output = ()>,
{
    type Task = T;
}