pub(crate) fn update_command_with_read_pref<T>(
        &self,
        server_address: &ServerAddress,
        command: &mut Command<T>,
        criteria: Option<&SelectionCriteria>,
    ) {
        let server_type = self
            .description
            .get_server_description(server_address)
            .map(|desc| desc.server_type)
            .unwrap_or(ServerType::Unknown);

        self.description
            .update_command_with_read_pref(server_type, command, criteria)
    }
/// Updates the given `command` as needed based on the `criteria`.
Updates the given `command` as needed based on the `criteria`.
Updates the given ` command ` as needed based on the ` criteria ` .
pub(crate) fn update_command_with_read_pref<T>(
        &self,
        server_address: &ServerAddress,
        command: &mut Command<T>,
        criteria: Option<&SelectionCriteria>,
    ) {
        let server_type = self
            .description
            .get_server_description(server_address)
            .map(|desc| desc.server_type)
            .unwrap_or(ServerType::Unknown);
        self.description
            .update_command_with_read_pref(server_type, command, criteria)
    }
pub ( crate ) fn update_command_with_read_pref < T > ( & self , server_address : & ServerAddress , command : & mut Command < T > , criteria : Option < & SelectionCriteria > , ) { let server_type = self . description . get_server_description ( server_address ) . map ( | desc | desc . server_type ) . unwrap_or ( ServerType :: Unknown ) ; self . description . update_command_with_read_pref ( server_type , command , criteria ) }
Updates the given `command` as needed based on the `criteria`.
Updates the given ` command ` as needed based on the ` criteria ` .
&self
server_address
&ServerAddress
command
&mut Command<T>
criteria
Option<&SelectionCriteria>
&self
server_address
&ServerAddress
command
&mut Command<T>
criteria
Option<&SelectionCriteria>