#[non_exhaustive]pub struct ErrorContext {Show 13 fields
pub stage: Option<ErrorStage>,
pub network_monitor: Option<Arc<NetworkMonitorDiagnostic>>,
pub windows_reachability: Option<WindowsReachabilityDiagnostic>,
pub client_id: Option<ClientId>,
pub session_id: Option<SessionId>,
pub connection_id: Option<ConnectionId>,
pub attempt_id: Option<AttemptId>,
pub request_id: Option<RequestId>,
pub ws_timeout_phase: Option<WsTimeoutPhase>,
pub http_status: Option<StatusCode>,
pub diagnostic: Option<HandshakeDiagnostic>,
pub peer_close: Option<PeerClose>,
pub io_end: Option<IoEndKind>,
}Expand description
Optional identifiers and protocol details retained alongside a NetError.
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.stage: Option<ErrorStage>Processing stage at which the error was classified, when known. HTTP execution failures can leave this unset when the transport does not establish the send/receive phase. A stage is not delivery evidence.
network_monitor: Option<Arc<NetworkMonitorDiagnostic>>The monitor step associated with a failure, with optional timing evidence.
Available on all platforms. For a timeout, the phase is the last observed progress, not proof that a native call returned an error. Shared ownership keeps unrelated errors small; clones retain the same immutable evidence.
windows_reachability: Option<WindowsReachabilityDiagnostic>Native failure details from Windows Internet-reachability sampling.
This field is available on every platform. The SDK leaves it None
for other failures, including network-name queries and non-Windows
sampling. It does not indicate that the network is offline.
client_id: Option<ClientId>WebSocket client identifier associated with the failure, when available.
session_id: Option<SessionId>Logical WebSocket session identifier associated with the failure, when available.
connection_id: Option<ConnectionId>Physical connection identifier associated with the failure, when available.
attempt_id: Option<AttemptId>Handshake attempt identifier associated with the failure, when available.
request_id: Option<RequestId>Request identifier associated with the failure, when available.
ws_timeout_phase: Option<WsTimeoutPhase>Expired WebSocket operation budget, when classified by the SDK.
http_status: Option<StatusCode>HTTP status received from the peer, including protocol or body-read failures.
diagnostic: Option<HandshakeDiagnostic>Handshake diagnostic captured for the failure, when available.
peer_close: Option<PeerClose>Peer close details associated with the failure, when available.
io_end: Option<IoEndKind>I/O termination classification associated with the failure, when available.