Enum embedded_websocket::WebSocketCloseStatusCode [−][src]
pub enum WebSocketCloseStatusCode {}Show variants
NormalClosure, EndpointUnavailable, ProtocolError, InvalidMessageType, Reserved, Empty, InvalidPayloadData, PolicyViolation, MessageTooBig, MandatoryExtension, InternalServerError, TlsHandshake, Custom(u16),
Websocket close status code as per the rfc6455 websocket spec
Variants
Normal 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
Protocol error (1002) indicates that an endpoint is terminating the connection due to a protocol error.
Invalid 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)
Reserved (1004) for future use
Empty (1005) indicates that no status code was present
Invalid 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)
Policy 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
Message 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
Mandatory 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
Internal server error (1011) indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request
TLS handshake (1015) connection was closed due to a failure to perform a TLS handshake
Custom(u16)
Custom close code
Trait Implementations
impl Clone for WebSocketCloseStatusCode
[src]
impl Clone for WebSocketCloseStatusCode
[src]fn clone(&self) -> WebSocketCloseStatusCode
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for WebSocketCloseStatusCode
[src]
impl Copy for WebSocketCloseStatusCode
[src]impl PartialEq<WebSocketCloseStatusCode> for WebSocketCloseStatusCode
[src]
impl PartialEq<WebSocketCloseStatusCode> for WebSocketCloseStatusCode
[src]fn eq(&self, other: &WebSocketCloseStatusCode) -> bool
[src]
fn ne(&self, other: &WebSocketCloseStatusCode) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for WebSocketCloseStatusCode
impl RefUnwindSafe for WebSocketCloseStatusCode
impl Send for WebSocketCloseStatusCode
impl Send for WebSocketCloseStatusCode
impl Sync for WebSocketCloseStatusCode
impl Sync for WebSocketCloseStatusCode
impl Unpin for WebSocketCloseStatusCode
impl Unpin for WebSocketCloseStatusCode
impl UnwindSafe for WebSocketCloseStatusCode
impl UnwindSafe for WebSocketCloseStatusCode