[−][src]Enum embedded_websocket::WebSocketCloseStatusCode
Websocket close status code as per the rfc6455 websocket spec
Variants
NormalClosureNormal closure (1000), meaning that the purpose for which the connection was established has been fulfilled
Endpoint unavailable (1001) indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page
ProtocolErrorProtocol error (1002) indicates that an endpoint is terminating the connection due to a protocol error.
InvalidMessageTypeInvalid message type (1003) indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message)
ReservedReserved (1004) for future use
EmptyEmpty (1005) indicates that no status code was present
InvalidPayloadDataInvalid payload data (1007) indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 data within a text message)
PolicyViolationPolicy violation (1008) indicates that an endpoint is terminating the connection because it has received a message that violates its policy. This is a generic status code that can be returned when there is no other more suitable status code
MessageTooBigMessage too big (1009) indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process
MandatoryExtensionMandatory extension (1010) indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake
InternalServerErrorInternal server error (1011) indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request
TlsHandshakeTLS handshake (1015) connection was closed due to a failure to perform a TLS handshake
Custom(u16)Custom close code
Trait Implementations
impl PartialEq<WebSocketCloseStatusCode> for WebSocketCloseStatusCode[src]
fn eq(&self, other: &WebSocketCloseStatusCode) -> bool[src]
fn ne(&self, other: &WebSocketCloseStatusCode) -> bool[src]
impl Debug for WebSocketCloseStatusCode[src]
impl Copy for WebSocketCloseStatusCode[src]
impl Clone for WebSocketCloseStatusCode[src]
fn clone(&self) -> WebSocketCloseStatusCode[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl Send for WebSocketCloseStatusCode
impl Sync for WebSocketCloseStatusCode
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self