#[non_exhaustive]pub enum SessionClosedReason {
Idle,
HostShutdown,
Leave,
Vacated,
Unknown(String),
}Expand description
The closed-reason vocabulary. Server-produced and published OPEN by owner ruling — the menu-B pick, which settles that this notification reason enum publishes open rather than resting on the result-vocabulary rule by analogy. A crash is deliberately not a reason, because a crash emits no notification at all.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Idle
The idle unload policy fired.
HostShutdown
Orderly daemon or stdio-EOF drain, including the SIGTERM/SIGINT wind-down.
Leave
A session/leave released this session after proven physical release.
Emitted before its paired session/statusChanged and the
session/leaveCompleted terminal.
Vacated
A draining daemon unloaded this session on the upgrade path and released
its lease. The successor on the canonical socket reloads it at the next
resume. Socket-only, experimental tier. A connection that did not opt in
receives the hostShutdown fallback for this value; opted-in
connections decode vacated.
Unknown(String)
A value from a newer host, kept verbatim so an older client decodes the rest of the message. Excluded from the generated schema while the enum stays declared open; never construct it with a known word.