#[non_exhaustive]pub struct FailoverProgressEvent {
pub phase: FailoverPhase,
pub failed_addr: Endpoint,
pub new_addr: Option<Endpoint>,
pub new_server_info: Option<ServerInfo>,
pub new_request_id: Option<i64>,
pub attempt: u32,
pub trigger: Error,
pub elapsed: Duration,
pub final_error: Option<Error>,
}Expand description
Notification delivered to the
ReaderQuery::on_failover_progress callback at each transition
of a mid-query failover lifecycle. See FailoverPhase for the
per-variant semantics.
Several fields are populated only in certain phases — see the
per-field docs. Marked #[non_exhaustive] so we can add fields
without breaking downstream pattern matches.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.phase: FailoverPhaseWhich lifecycle phase fired this event.
failed_addr: EndpointEndpoint that died. Set on every phase — even Reset keeps it
so a single sink can correlate the failed/new pair without
remembering state across calls.
new_addr: Option<Endpoint>New endpoint the cursor is now bound to. Some only on
FailoverPhase::Reset.
new_server_info: Option<ServerInfo>SERVER_INFO of the new endpoint. Some only on
FailoverPhase::Reset.
new_request_id: Option<i64>Newly-allocated request_id. Some only on
FailoverPhase::Reset.
attempt: u321-based attempt counter:
0onDisconnected(no attempt yet).N ≥ 1onRetryingfor the Nth dial.- On
Reset, the attempt that landed. - On
GaveUp, the total number of attempts burned. May be0when the wall-clock deadline was already exhausted before any walk fired.
trigger: ErrorThe error that triggered the failover (the original cause-of-death of the previous connection). Preserved across every phase so subscribers see consistent context regardless of when they latch on.
elapsed: DurationWall-clock time since the disconnect was observed (the start of the failover cycle). Monotonically non-decreasing across phases of the same event.
final_error: Option<Error>Final error returned to the caller. Some only on
FailoverPhase::GaveUp; this is the value the next call to
Cursor::next_batch (or add_credit) will surface.
Trait Implementations§
Source§impl Clone for FailoverProgressEvent
impl Clone for FailoverProgressEvent
Source§fn clone(&self) -> FailoverProgressEvent
fn clone(&self) -> FailoverProgressEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FailoverProgressEvent
impl RefUnwindSafe for FailoverProgressEvent
impl Send for FailoverProgressEvent
impl Sync for FailoverProgressEvent
impl Unpin for FailoverProgressEvent
impl UnsafeUnpin for FailoverProgressEvent
impl UnwindSafe for FailoverProgressEvent
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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