pub struct ServerFailoverOptions { /* private fields */ }Expand description
Server failover options.
When a DNS server fails to respond to a query, c-ares will deprioritize the server. On
subsequent queries, servers with fewer consecutive failures will be selected in preference.
However, in order to detect when such a server has recovered, c-ares will occasionally retry
failed servers. ServerFailoverOptions contains options to control this behaviour.
Implementations§
Source§impl ServerFailoverOptions
impl ServerFailoverOptions
Sourcepub fn set_retry_chance(&mut self, retry_chance: u16) -> &mut Self
pub fn set_retry_chance(&mut self, retry_chance: u16) -> &mut Self
The retry_chance sets the probability (1/N) of retrying a failed server on any given
query. Setting to a value of 0 disables retries.
Sourcepub fn set_retry_delay(&mut self, retry_delay: usize) -> &mut Self
pub fn set_retry_delay(&mut self, retry_delay: usize) -> &mut Self
The retry_delay sets the minimum delay in milliseconds that c-ares will wait before
retrying a specific failed server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerFailoverOptions
impl RefUnwindSafe for ServerFailoverOptions
impl Send for ServerFailoverOptions
impl Sync for ServerFailoverOptions
impl Unpin for ServerFailoverOptions
impl UnwindSafe for ServerFailoverOptions
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more