pub(crate) fn create(
        address: ServerAddress,
        options: &ClientOptions,
        topology: WeakTopology,
        http_client: HttpClient,
    ) -> (Arc<Self>, Monitor) {
        let (update_sender, update_receiver) = ServerUpdateSender::channel();
        let server = Arc::new(Self {
            pool: ConnectionPool::new(
                address.clone(),
                http_client,
                update_sender,
                Some(ConnectionPoolOptions::from_client_options(options)),
            ),
            address: address.clone(),
            operation_count: AtomicU32::new(0),
        });

        let monitor = Monitor::new(address, &server, topology, options.clone(), update_receiver);
        (server, monitor)
    }
/// Create a new reference counted `Server` instance and a `Monitor` for that server.
/// The monitor is not started as part of this; call `Monitor::execute` to start it.
Create a new reference counted `Server` instance and a `Monitor` for that server.
The monitor is not started as part of this; call `Monitor::execute` to start it.
Create a new reference counted ` Server ` instance and a ` Monitor ` for that server . The monitor is not started as part of this ; call ` Monitor :: execute ` to start it .
pub(crate) fn create(
        address: ServerAddress,
        options: &ClientOptions,
        topology: WeakTopology,
        http_client: HttpClient,
    ) -> (Arc<Self>, Monitor) {
        let (update_sender, update_receiver) = ServerUpdateSender::channel();
        let server = Arc::new(Self {
            pool: ConnectionPool::new(
                address.clone(),
                http_client,
                update_sender,
                Some(ConnectionPoolOptions::from_client_options(options)),
            ),
            address: address.clone(),
            operation_count: AtomicU32::new(0),
        });
        let monitor = Monitor::new(address, &server, topology, options.clone(), update_receiver);
        (server, monitor)
    }
pub ( crate ) fn create ( address : ServerAddress , options : & ClientOptions , topology : WeakTopology , http_client : HttpClient , ) -> ( Arc < Self > , Monitor ) { let ( update_sender , update_receiver ) = ServerUpdateSender :: channel ( ) ; let server = Arc :: new ( Self { pool : ConnectionPool :: new ( address . clone ( ) , http_client , update_sender , Some ( ConnectionPoolOptions :: from_client_options ( options ) ) , ) , address : address . clone ( ) , operation_count : AtomicU32 :: new ( 0 ) , } ) ; let monitor = Monitor :: new ( address , & server , topology , options . clone ( ) , update_receiver ) ; ( server , monitor ) }
Create a new reference counted `Server` instance and a `Monitor` for that server.
Create a new reference counted ` Server ` instance and a ` Monitor ` for that server .
address
ServerAddress
options
&ClientOptions
topology
WeakTopology
http_client
HttpClient
address
ServerAddress
options
&ClientOptions
topology
WeakTopology
http_client
HttpClient