pub(crate) async fn attempt_to_select_server(
        &self,
        criteria: &SelectionCriteria,
    ) -> Result<Option<SelectedServer>> {
        let topology_state = self.state.read().await;

        server_selection::attempt_to_select_server(
            criteria,
            &topology_state.description,
            &topology_state.servers,
        )
    }
/// Clones the underlying TopologyState. This will return a separate TopologyState than the one
/// contained by this `Topology`, but it will share references to the same Servers (and by
/// extension the connection pools).
/// Attempts to select a server with the given `criteria`, returning an error if the topology is
/// not compatible with the driver.
Clones the underlying TopologyState. This will return a separate TopologyState than the one
contained by this `Topology`, but it will share references to the same Servers (and by
extension the connection pools).
Attempts to select a server with the given `criteria`, returning an error if the topology is
not compatible with the driver.
Clones the underlying TopologyState . This will return a separate TopologyState than the one contained by this ` Topology ` but it will share references to the same Servers ( and by extension the connection pools ) . Attempts to select a server with the given ` criteria ` returning an error if the topology is not compatible with the driver .
pub(crate) async fn attempt_to_select_server(
        &self,
        criteria: &SelectionCriteria,
    ) -> Result<Option<SelectedServer>> {
        let topology_state = self.state.read().await;
        server_selection::attempt_to_select_server(
            criteria,
            &topology_state.description,
            &topology_state.servers,
        )
    }
pub ( crate ) async fn attempt_to_select_server ( & self , criteria : & SelectionCriteria , ) -> Result < Option < SelectedServer > > { let topology_state = self . state . read ( ) . await ; server_selection :: attempt_to_select_server ( criteria , & topology_state . description , & topology_state . servers , ) }
Clones the underlying TopologyState.
Clones the underlying TopologyState .
&self
criteria
&SelectionCriteria
&self
criteria
&SelectionCriteria