#[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 UnsafeUnpin 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<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
Compare self to
key and return true if they are equal.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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more