pub fn new_tls(
        url: String,
        user: Option<String>,
        pass: Option<String>,
    ) -> Result<Client<HttpsConnector<HttpConnector>>, TlsError> {
        // Check that if we have a password, we have a username; other way around is ok
        debug_assert!(pass.is_none() || user.is_some());
        let https = HttpsConnector::new()?;
        let https_client = HyperClient::builder().build::<_, Body>(https);
        Ok(Client {
            url,
            user,
            pass,
            client: https_client,
            nonce: AtomicUsize::new(0),
        })
    }
/// Creates a new TLS client.
Creates a new TLS client.
Creates a new TLS client .
pub fn new_tls(
        url: String,
        user: Option<String>,
        pass: Option<String>,
    ) -> Result<Client<HttpsConnector<HttpConnector>>, TlsError> {
        // Check that if we have a password, we have a username; other way around is ok
        debug_assert!(pass.is_none() || user.is_some());
        let https = HttpsConnector::new()?;
        let https_client = HyperClient::builder().build::<_, Body>(https);
        Ok(Client {
            url,
            user,
            pass,
            client: https_client,
            nonce: AtomicUsize::new(0),
        })
    }
pub fn new_tls ( url : String , user : Option < String > , pass : Option < String > , ) -> Result < Client < HttpsConnector < HttpConnector > > , TlsError > { // Check that if we have a password, we have a username; other way around is ok debug_assert ! ( pass is_none ( ) user is_some ( ) ) ; let https = HttpsConnector :: new ( ) ? ; let https_client = HyperClient :: builder ( ) . build :: < _ , Body > ( https ) ; Ok ( Client { url , user , pass , client : https_client , nonce : AtomicUsize :: new ( 0 ) , } ) }
Creates a new TLS client.
Creates a new TLS client .
url
String
user
Option<String>
pass
Option<String>
url
String
user
Option<String>
pass
Option<String>