Hi
When trying to use tokio_native_tls' TlsConnector (https://docs.rs/tokio-native-tls/0.1.0/tokio_native_tls/struct.TlsConnector.html), I encountered an error stating that it requires 3 arguments but I only provided 2. Am I missing the "self" argument since the arguments required are self, domain and stream.
use futures::executor::block_on;
use tokio_native_tls::{ TlsConnector };
async fn async_main()
{
let tcp_stream = async_std::net::TcpStream::connect("127.0.0.1:4444").await;
match tcp_stream
{
Ok(working_stream) =>
{
let tokio_tls_connector = TlsConnector::connect("127.0.0.1:4444",working_stream);
//expected 3 arguments, supplied 2
}
Err(error) =>
{
panic!("cannot establish TCP stream {}",error);
}
}
}
fn main() {
async_std::task::block_on(async_main());
}