#[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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CloseReason
impl Debug for CloseReason
Source§impl Display for CloseReason
impl Display for CloseReason
impl Eq for CloseReason
Source§impl FromStr for CloseReason
impl FromStr for CloseReason
Source§impl PartialEq for CloseReason
impl PartialEq for CloseReason
impl StructuralPartialEq for CloseReason
Auto Trait Implementations§
impl Freeze for CloseReason
impl RefUnwindSafe for CloseReason
impl Send for CloseReason
impl Sync for CloseReason
impl Unpin for CloseReason
impl UnsafeUnpin for CloseReason
impl UnwindSafe for CloseReason
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.