[−][src]Struct stdweb::web::SocketCloseCode
Wrapper type around a CloseEvent code, indicating why the WebSocket was closed
Methods
impl SocketCloseCode
[src]
pub const NORMAL_CLOSURE: SocketCloseCode
[src]
Normal closure; the connection successfully completed whatever purpose for which it was created.
pub const GOING_AWAY: SocketCloseCode
[src]
The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
pub const PROTOCOL_ERROR: SocketCloseCode
[src]
The endpoint is terminating the connection due to a protocol error.
pub const UNSUPPORTED_DATA: SocketCloseCode
[src]
The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
pub const NO_STATUS_RECEIVED: SocketCloseCode
[src]
Reserved. Indicates that no status code was provided even though one was expected.
pub const ABNORMAL_CLOSURE: SocketCloseCode
[src]
Reserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.
pub const INVALID_FRAME_PAYLOAD_DATA: SocketCloseCode
[src]
The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).
pub const POLICY_VIOLATION: SocketCloseCode
[src]
The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.
pub const MESSAGE_TOO_BIG: SocketCloseCode
[src]
The endpoint is terminating the connection because a data frame was received that is too large.
pub const MISSING_EXTENSION: SocketCloseCode
[src]
The client is terminating the connection because it expected the server to negotiate one or more extensions, but the server didn't.
pub const INTERNAL_ERROR: SocketCloseCode
[src]
The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
pub const SERVICE_RESTART: SocketCloseCode
[src]
The server is terminating the connection because it is restarting.
pub const TRY_AGAIN_LATER: SocketCloseCode
[src]
The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.
pub const BAD_GATEWAY: SocketCloseCode
[src]
The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.
pub const TLS_HANDSHAKE: SocketCloseCode
[src]
Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).
Trait Implementations
impl Clone for SocketCloseCode
[src]
fn clone(&self) -> SocketCloseCode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SocketCloseCode
[src]
impl Eq for SocketCloseCode
[src]
impl Ord for SocketCloseCode
[src]
fn cmp(&self, other: &SocketCloseCode) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<SocketCloseCode> for SocketCloseCode
[src]
fn eq(&self, other: &SocketCloseCode) -> bool
[src]
fn ne(&self, other: &SocketCloseCode) -> bool
[src]
impl PartialOrd<SocketCloseCode> for SocketCloseCode
[src]
fn partial_cmp(&self, other: &SocketCloseCode) -> Option<Ordering>
[src]
fn lt(&self, other: &SocketCloseCode) -> bool
[src]
fn le(&self, other: &SocketCloseCode) -> bool
[src]
fn gt(&self, other: &SocketCloseCode) -> bool
[src]
fn ge(&self, other: &SocketCloseCode) -> bool
[src]
impl Debug for SocketCloseCode
[src]
impl Hash for SocketCloseCode
[src]
Auto Trait Implementations
impl Send for SocketCloseCode
impl Sync for SocketCloseCode
impl Unpin for SocketCloseCode
impl UnwindSafe for SocketCloseCode
impl RefUnwindSafe for SocketCloseCode
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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> 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,