pub enum BackendChange {
StreamsStarted(usize),
StreamsEnded(usize),
ConnectionClosed,
DialFailed(Instant),
}Expand description
The accounting operations BackendDelta can carry.
The two counters invariant 14 is about, plus the release of a
reservation whose dial never started. The other health and latency writes
the mux makes (failures and retry_policy on an asynchronous connect
failure, connection_time) are NOT here: they stay immediate at their
existing embedder-side call sites rather than being deferred to a drain.
Variants§
StreamsStarted(usize)
Backend::active_requests += n — n streams started on this backend.
StreamsEnded(usize)
Backend::active_requests -= n, saturating — n streams left it.
ConnectionClosed
Backend::dec_connections() — the connection to this backend closed,
or a dial that connected was abandoned before its connection was
registered (Mux::dial_backend, #1713): either way the reservation
selection took is released, and no failure is recorded.
DialFailed(Instant)
The connect(2) of a dial failed at this instant (#1684): release the
reservation selection took (Backend::dec_connections()), and record
the failure (failures += 1, retry_policy.fail), as
Backend::release_failed_dial does. The drain before the next
selection applies it, so that selection sees the backend exactly as a
failed Backend::try_connect left it.
Trait Implementations§
Source§impl Clone for BackendChange
impl Clone for BackendChange
impl Copy for BackendChange
Source§impl Debug for BackendChange
impl Debug for BackendChange
impl Eq for BackendChange
Source§impl PartialEq for BackendChange
impl PartialEq for BackendChange
impl StructuralPartialEq for BackendChange
Auto Trait Implementations§
impl Freeze for BackendChange
impl RefUnwindSafe for BackendChange
impl Send for BackendChange
impl Sync for BackendChange
impl Unpin for BackendChange
impl UnsafeUnpin for BackendChange
impl UnwindSafe for BackendChange
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.