fn update_rs_without_primary_server(
        &mut self,
        server_description: ServerDescription,
    ) -> Result<(), String> {
        if self.set_name.is_none() {
            self.set_name = server_description.set_name()?;
        } else if self.set_name != server_description.set_name()? {
            self.servers.remove(&server_description.address);

            return Ok(());
        }

        self.add_new_servers(server_description.known_hosts()?)?;

        if server_description.invalid_me()? {
            self.servers.remove(&server_description.address);
        }

        Ok(())
    }
/// Update the ReplicaSetNoPrimary topology description based on the non-primary server
/// description.
Update the ReplicaSetNoPrimary topology description based on the non-primary server
description.
Update the ReplicaSetNoPrimary topology description based on the non - primary server description .
fn update_rs_without_primary_server(
        &mut self,
        server_description: ServerDescription,
    ) -> Result<(), String> {
        if self.set_name.is_none() {
            self.set_name = server_description.set_name()?;
        } else if self.set_name != server_description.set_name()? {
            self.servers.remove(&server_description.address);
            return Ok(());
        }
        self.add_new_servers(server_description.known_hosts()?)?;
        if server_description.invalid_me()? {
            self.servers.remove(&server_description.address);
        }
        Ok(())
    }
fn update_rs_without_primary_server ( & mut self , server_description : ServerDescription , ) -> Result < ( ) , String > { if self . set_name . is_none ( ) { self . set_name = server_description . set_name ( ) ? ; } else if self . set_name != server_description . set_name ( ) ? { self . servers . remove ( & server_description . address ) ; return Ok ( ( ) ) ; } self . add_new_servers ( server_description . known_hosts ( ) ? ) ? ; if server_description . invalid_me ( ) ? { self . servers . remove ( & server_description . address ) ; } Ok ( ( ) ) }
Update the ReplicaSetNoPrimary topology description based on the non-primary server
description.
Update the ReplicaSetNoPrimary topology description based on the non - primary server description .
&mut self
server_description
ServerDescription
&mut self
server_description
ServerDescription