pub enum Outcome {
Exit {
code: i32,
},
TransportClosed,
WriterFailed,
InitializeFailed,
}Expand description
How one connection ended.
Serving a Server or Client connection resolves to exactly one Outcome or
to a transport Error; it never terminates the process. A server binary
maps its outcome to a process disposition itself — Outcome::code
reports the exit code the LSP lifecycle implies.
Variants§
Exit
The endpoint processed exit. For a Server, code is 0 when the peer
sent shutdown first and 1 otherwise; a Client permits local exit
only after its shutdown request succeeds and therefore reports 0.
TransportClosed
The transport ended before exit, or a Client disconnected locally.
WriterFailed
The outbound path failed terminally: the writer failed, or required protocol traffic could not fit within the configured queue budgets.
InitializeFailed
A failed initialize transaction terminated the connection after its fixed error response was enqueued (ADR 0018).