socks5-protocol-async 0.2.3

Async I/O SOCKS5 protocol implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use futures::pin_mut;
use futures_test::task::noop_context;
use std::future::Future;
use std::task::Poll;

pub fn extract_future_output<F, T>(future: F) -> T
where
    F: Future<Output = T>,
{
    let mut cx = noop_context();
    pin_mut!(future);
    match future.poll(&mut cx) {
        Poll::Pending => panic!("had to be ready"),
        Poll::Ready(v) => v,
    }
}