Struct abstract_ns::WeightedSet
[−]
[src]
pub struct WeightedSet<'a> { /* fields omitted */ }
A structure that represents a set of addresses of the same priority
Methods
impl<'a> WeightedSet<'a>
[src]
fn pick_one(&self) -> Option<SocketAddr>
Select one random address to connect to
This function selects a host according to the random distribution according to the weights.
Returns None
if the set is empty