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