#[non_exhaustive]pub enum GoodbyeReason {
AnotherServer,
Restart,
Shutdown,
UserRequest,
Unpaired,
}Expand description
Why a client says goodbye to a server.
The value is the reason field of client/goodbye, which the client sends before a graceful
close so the server knows whether to reconnect. Only the reasons this revision can reach are
named: a reason that needs a state this client cannot detect - unauthorized,
pairing_required, concurrent_attempt - is left out until that state exists. The enum is
non-exhaustive: a later revision may add one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AnotherServer
The client is switching to another server.
messaging.md requires this reason from a client that leaves one server for another; with
one connection this revision only lets a host express it through
ClientHandle::close.
Restart
The client is restarting and will reconnect.
Shutdown
The client is shutting down or otherwise going offline.
UserRequest
The operator asked to disconnect from this server.
Unpaired
The client processed server/unpair.