pub struct ServerList { /* private fields */ }Implementations§
Source§impl ServerList
impl ServerList
pub async fn discover() -> Result<ServerList, ServerDiscoveryError>
pub async fn discover_with( options: DiscoverOptions, ) -> Result<ServerList, ServerDiscoveryError>
Sourcepub fn pick(&self) -> SocketAddr
pub fn pick(&self) -> SocketAddr
Pick a server from the server list, rotating them in a round-robin way for reconnects.
§Returns
The selected SocketAddr
Trait Implementations§
Source§impl Clone for ServerList
impl Clone for ServerList
Source§fn clone(&self) -> ServerList
fn clone(&self) -> ServerList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerList
impl RefUnwindSafe for ServerList
impl Send for ServerList
impl Sync for ServerList
impl Unpin for ServerList
impl UnwindSafe for ServerList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more