pub fn new(datasource: DataSource, reactor: &reactor::Handle) -> Result<Self, Error> {
        let https_connector = HttpsConnector::new(4, reactor)
            .map_err(|cause| Error::Communication(cause.to_string()))?;
        let mut timeout_connector = TimeoutConnector::new(https_connector, reactor);
        timeout_connector.set_connect_timeout(Some(*datasource.timeout()));
        let client = Client::configure()
            .connector(timeout_connector)
            .build(reactor);
        debug!("Creating new JSON/HTTP connector for {:?}", &datasource);
        Ok(JsonHttpConnector {
            user_agent: &RinconUserAgent,
            datasource: Arc::new(datasource),
            token: Arc::new(None),
            client: Arc::new(client),
        })
    }
/// Creates a new instance of the `JsonHttpConnector`.
///
/// The returned `JsonHttpConnector` sets the User-Agent header field of the
/// HTTP protocol to information about the rincon driver. If you want to use
/// information about your application as the User-Agent use the alternative
/// `with_user_agent()` method to create the `JsonHttpConnector` instance.
///
/// # Arguments
///
/// * `datasource` : a `DataSource` that holds the connection parameters
///   used to connect to the database server.
/// * `reactor` : a handle of a `reactor::Core` instance of the `tokio-core`
///   crate.
Creates a new instance of the `JsonHttpConnector`.
The returned `JsonHttpConnector` sets the User-Agent header field of the
HTTP protocol to information about the rincon driver. If you want to use
information about your application as the User-Agent use the alternative
`with_user_agent()` method to create the `JsonHttpConnector` instance.
Creates a new instance of the ` JsonHttpConnector ` . The returned ` JsonHttpConnector ` sets the User - Agent header field of the HTTP protocol to information about the rincon driver . If you want to use information about your application as the User - Agent use the alternative ` with_user_agent () ` method to create the ` JsonHttpConnector ` instance .
pub fn new(datasource: DataSource, reactor: &reactor::Handle) -> Result<Self, Error> {
        let https_connector = HttpsConnector::new(4, reactor)
            .map_err(|cause| Error::Communication(cause.to_string()))?;
        let mut timeout_connector = TimeoutConnector::new(https_connector, reactor);
        timeout_connector.set_connect_timeout(Some(*datasource.timeout()));
        let client = Client::configure()
            .connector(timeout_connector)
            .build(reactor);
        debug!("Creating new JSON/HTTP connector for {:?}", &datasource);
        Ok(JsonHttpConnector {
            user_agent: &RinconUserAgent,
            datasource: Arc::new(datasource),
            token: Arc::new(None),
            client: Arc::new(client),
        })
    }
pub fn new ( datasource : DataSource , reactor : & reactor :: Handle ) -> Result < Self , Error > { let https_connector = HttpsConnector :: new ( 4 , reactor ) . map_err ( | cause | Error :: Communication ( cause . to_string ( ) ) ) ? ; let mut timeout_connector = TimeoutConnector :: new ( https_connector , reactor ) ; timeout_connector . set_connect_timeout ( Some ( * datasource . timeout ( ) ) ) ; let client = Client :: configure ( ) . connector ( timeout_connector ) . build ( reactor ) ; debug ! ( " " datasource ) ; Ok ( JsonHttpConnector { user_agent : & RinconUserAgent , datasource : Arc :: new ( datasource ) , token : Arc :: new ( None ) , client : Arc :: new ( client ) , } ) }
Creates a new instance of the `JsonHttpConnector`.
Creates a new instance of the ` JsonHttpConnector ` .
datasource
DataSource
reactor
&reactor::Handle
datasource
DataSource
reactor
&reactor::Handle