/// Whether this topology has a writable server available.
Whether this topology has a writable server available.
Whether this topology has a writable server available .
pub fn has_writable_server(&self) -> bool {
        match self.description.topology_type {
            TopologyType::Unknown | TopologyType::ReplicaSetNoPrimary => false,
            TopologyType::Single | TopologyType::Sharded => {
                self.description.has_available_servers()
            }
            TopologyType::ReplicaSetWithPrimary | TopologyType::LoadBalanced => true,
        }
    }
pub fn has_writable_server ( & self ) -> bool { match self . description . topology_type { TopologyType :: Unknown | TopologyType :: ReplicaSetNoPrimary => false , TopologyType :: Single | TopologyType :: Sharded => { self . description . has_available_servers ( ) } TopologyType :: ReplicaSetWithPrimary | TopologyType :: LoadBalanced => true , } }
Whether this topology has a writable server available.
Whether this topology has a writable server available .
&self