#[non_exhaustive]pub enum ConnectionEventKind {
AttemptStarted {
attempt: HandshakeAttempt,
},
Established {
connection: ConnectionInfo,
},
AttemptFailed {
attempt: HandshakeAttempt,
credential_version: Option<String>,
error: NetError,
retry: RetryDecision,
},
Disconnected {
connection: ConnectionInfo,
end: ConnectionEnd,
},
Closed {
result: Result<SessionEnd>,
},
}Expand description
Specific lifecycle event kinds and their associated information.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AttemptStarted
A new handshake attempt has been started.
Fields
attempt: HandshakeAttemptClient, session, cycle ID and metadata for this attempt.
Established
The handshake is successful and the connection is established.
Fields
connection: ConnectionInfoThe identity and establishment time of the newly established connection.
AttemptFailed
A handshake attempt failed and it has been determined whether to continue retrying.
Fields
attempt: HandshakeAttemptIdentity and metadata of the failed attempt.
credential_version: Option<String>Credential version obtained for the attempt; None if the provider
did not return one.
retry: RetryDecisionThe decision to stop or delay retry after this failure.
Disconnected
The physical connection ended; the session’s reconnect policy determines whether another connection attempt is made.
Fields
connection: ConnectionInfoThe connection information ended this time.
end: ConnectionEndTermination reason and any available error, peer-close, and I/O details.
Closed
The entire connection session has ended.
Fields
result: Result<SessionEnd>Final session-end details, or the error that caused termination.