#[non_exhaustive]pub enum CloseReason {
Show 13 variants
CertificateRotated,
CertificateRevoked,
NoValidCertificate,
InternalError,
CertificateNotRecognized,
ServiceDeactivated,
ServiceNotApproved,
ServiceNotFound,
EnrollmentTimeout,
RateLimitExceeded,
ProtocolError,
Superseded,
Unknown(String),
}Expand description
Reason included in a WebSocket close frame by the controller.
Known variants map 1:1 to the wire strings sent in close frames.
Unknown provides forward compatibility for strings
not yet recognized by the receiver.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CertificateRotated
The service’s TLS certificate was rotated by the controller.
CertificateRevoked
The service’s TLS certificate was revoked.
NoValidCertificate
No valid certificate was presented during the TLS handshake.
InternalError
An internal server error occurred.
CertificateNotRecognized
The presented certificate is not recognized by the controller.
ServiceDeactivated
The service has been deactivated by an administrator.
ServiceNotApproved
The service has not been approved yet.
ServiceNotFound
The service was not found in the controller’s database.
EnrollmentTimeout
The enrollment handshake timed out.
RateLimitExceeded
The service exceeded the connection rate limit.
ProtocolError
The service sent an unexpected or malformed protocol message.
Used when the service violates the expected message sequence, for
example by sending a message other than Register as the first
frame after authentication completes.
Superseded
A newer connection from the same service superseded this one.
Unknown(String)
A close reason string not recognized by this build.
Provides forward compatibility: a newer controller may send reasons that an older service does not yet know about.
Implementations§
Trait Implementations§
Source§impl Clone for CloseReason
impl Clone for CloseReason
Source§fn clone(&self) -> CloseReason
fn clone(&self) -> CloseReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more