#[repr(u16)]pub enum CloseCode {
Show 13 variants
Normal = 1_000,
Away = 1_001,
ProtocolError = 1_002,
Unsupported = 1_003,
NoStatus = 1_005,
Abnormal = 1_006,
InvalidPayload = 1_007,
PolicyViolation = 1_008,
TooBig = 1_009,
MandatoryExtension = 1_010,
Internal = 1_011,
TlsHandshake = 1_015,
Application(u16),
}Expand description
WebSocket close codes as defined in RFC 6455
Variants§
Normal = 1_000
Normal closure
Away = 1_001
Going away
ProtocolError = 1_002
Protocol error
Unsupported = 1_003
Unsupported data
NoStatus = 1_005
No status received
Abnormal = 1_006
Abnormal closure
InvalidPayload = 1_007
Invalid frame payload data
PolicyViolation = 1_008
Policy violation
TooBig = 1_009
Message too big
MandatoryExtension = 1_010
Mandatory extension
Internal = 1_011
Internal server error
TlsHandshake = 1_015
TLS handshake failure
Application(u16)
Application-specific close code
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