Enum hiirc::ReconnectionSettings []

pub enum ReconnectionSettings {
    DoNotReconnect,
    Reconnect {
        max_attempts: u32,
        delay_between_attempts: Duration,
        delay_after_disconnect: Duration,
    },
}

These settings tell the reconnection process how to behave.

Default is implemented for this type, with fairly sensible settings. See the Default trait implementation.

Variants

DoNotReconnect

Don't try to reconnect after failure.

Reconnect

Reconnect

Fields

max_attempts: u32
delay_between_attempts: Duration
delay_after_disconnect: Duration

Trait Implementations

impl PartialEq<ReconnectionSettings> for ReconnectionSettings

fn eq(&self, __arg_0: &ReconnectionSettings) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &ReconnectionSettings) -> bool

This method tests for !=.

impl Eq for ReconnectionSettings

impl Debug for ReconnectionSettings

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl Clone for ReconnectionSettings

fn clone(&self) -> ReconnectionSettings

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for ReconnectionSettings

impl Default for ReconnectionSettings

Default settings are provided for this enum.

They are:

max_attempts = 10

delay_between_attempts = 5 seconds

delay_after_disconnect = 60 seconds

fn default() -> ReconnectionSettings