Skip to main content

select_best_server

Function select_best_server 

Source
pub fn select_best_server(servers: &[Server]) -> Result<Server, Error>
Expand description

Select the best server from a list based on distance.

Returns the server with the lowest distance to the client.

ยงErrors

Returns Error::ServerNotFound if the server list is empty.