pub enum CloseCode {
Show 15 variants
Normal,
GoingAway,
ProtocolError,
UnsupportedData,
NoStatusReceived,
AbnormalClosure,
InvalidPayload,
PolicyViolation,
MessageTooBig,
MandatoryExtension,
InternalError,
ServiceRestart,
TryAgainLater,
BadGateway,
Application(u16),
}Expand description
WebSocket close status code (RFC 6455 §7.4.1).
Variants§
Normal
Normal closure (1000).
GoingAway
Endpoint going away (1001).
ProtocolError
Protocol error (1002).
UnsupportedData
Unsupported data type (1003).
NoStatusReceived
No status code present (1005) — must not be sent in a frame.
AbnormalClosure
Abnormal closure (1006) — must not be sent in a frame.
InvalidPayload
Invalid payload data (1007).
PolicyViolation
Policy violation (1008).
MessageTooBig
Message too big (1009).
MandatoryExtension
Missing expected extension (1010).
InternalError
Internal server error (1011).
ServiceRestart
Service restart (1012).
TryAgainLater
Try again later (1013).
BadGateway
Bad gateway (1014).
Application(u16)
Application-defined or registered code in the 3000-4999 range.
Implementations§
Trait Implementations§
impl Copy for CloseCode
impl Eq for CloseCode
impl StructuralPartialEq for CloseCode
Auto Trait Implementations§
impl Freeze for CloseCode
impl RefUnwindSafe for CloseCode
impl Send for CloseCode
impl Sync for CloseCode
impl Unpin for CloseCode
impl UnwindSafe for CloseCode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).