Trait ReconnectDelegate

Source
pub trait ReconnectDelegate:
    Send
    + Sync
    + 'static {
    type Id: Id;
    type Address: CheapClone + Send + Sync + 'static;

    // Required method
    fn reconnect_timeout(
        &self,
        member: &Member<Self::Id, Self::Address>,
        timeout: Duration,
    ) -> Duration;
}
Expand description

Implemented to allow overriding the reconnect timeout for individual members.

Required Associated Types§

Source

type Id: Id

The id type of the delegate

Source

type Address: CheapClone + Send + Sync + 'static

The address type of the delegate

Required Methods§

Source

fn reconnect_timeout( &self, member: &Member<Self::Id, Self::Address>, timeout: Duration, ) -> Duration

Returns the reconnect timeout for the given member.

Implementations on Foreign Types§

Source§

impl<T: ReconnectDelegate + ?Sized> ReconnectDelegate for Box<T>
where Box<T>: Send + Sync + 'static,

Source§

type Id = <T as ReconnectDelegate>::Id

Source§

type Address = <T as ReconnectDelegate>::Address

Source§

fn reconnect_timeout( &self, member: &Member<Self::Id, Self::Address>, timeout: Duration, ) -> Duration

Source§

impl<T: ReconnectDelegate + ?Sized> ReconnectDelegate for Arc<T>
where Arc<T>: Send + Sync + 'static,

Source§

type Id = <T as ReconnectDelegate>::Id

Source§

type Address = <T as ReconnectDelegate>::Address

Source§

fn reconnect_timeout( &self, member: &Member<Self::Id, Self::Address>, timeout: Duration, ) -> Duration

Implementors§

Source§

impl<I, A> ReconnectDelegate for NoopReconnectDelegate<I, A>
where I: Id + Send + Sync + 'static, A: CheapClone + Send + Sync + 'static,

Source§

type Id = I

Source§

type Address = A

Source§

impl<I, A, M, R> ReconnectDelegate for CompositeDelegate<I, A, M, R>
where I: Id + Send + Sync + 'static, A: CheapClone + Send + Sync + 'static, M: Send + Sync + 'static, R: ReconnectDelegate<Id = I, Address = A>,