pub struct FailoverPool<F, P>(/* private fields */)
where
F: ClientFacts,
P: ClientTransport;Expand description
A pool supports failover to multiple address with optional round_robin strategy
Supports async and blocking context.
Only retry RpcIntErr that less than RpcIntErr::Method, currently ignore custom error due to complexity of generic.
NOTE: there’s cycle reference inside FailoverPoolInner and it’s ClientPool, don’t clone FailoverPool as it has custom drop. FailoverPool should be put in Arc for usage.
Implementations§
Source§impl<F, P> FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
impl<F, P> FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
Trait Implementations§
Source§impl<F, P> ClientCaller for FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
impl<F, P> ClientCaller for FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
Source§impl<F, P> ClientCallerBlocking for FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
impl<F, P> ClientCallerBlocking for FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
Source§impl<F, P> Drop for FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
impl<F, P> Drop for FailoverPool<F, P>where
F: ClientFacts,
P: ClientTransport,
Auto Trait Implementations§
impl<F, P> Freeze for FailoverPool<F, P>
impl<F, P> !RefUnwindSafe for FailoverPool<F, P>
impl<F, P> Send for FailoverPool<F, P>
impl<F, P> Sync for FailoverPool<F, P>
impl<F, P> Unpin for FailoverPool<F, P>
impl<F, P> !UnwindSafe for FailoverPool<F, P>
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