Struct tokio_websockets::proto::CloseCode
source · pub struct CloseCode(/* private fields */);
Expand description
Close status code.
Implementations§
source§impl CloseCode
impl CloseCode
sourcepub const NORMAL_CLOSURE: Self = _
pub const NORMAL_CLOSURE: Self = _
Normal closure, meaning that the purpose for which the connection was established has been fulfilled.
sourcepub const GOING_AWAY: Self = _
pub const GOING_AWAY: Self = _
Endpoint is “going away”, such as a server going down or a browser having navigated away from a page.
sourcepub const PROTOCOL_ERROR: Self = _
pub const PROTOCOL_ERROR: Self = _
Endpoint is terminating the connection due to a protocol error.
sourcepub const UNSUPPORTED_DATA: Self = _
pub const UNSUPPORTED_DATA: Self = _
Endpoint is terminating the connection because it has received a type of data it cannot accept.
sourcepub const NO_STATUS_RECEIVED: Self = _
pub const NO_STATUS_RECEIVED: Self = _
No status code was actually present.
sourcepub const INVALID_FRAME_PAYLOAD_DATA: Self = _
pub const INVALID_FRAME_PAYLOAD_DATA: Self = _
Endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message.
sourcepub const POLICY_VIOLATION: Self = _
pub const POLICY_VIOLATION: Self = _
Endpoint is terminating the connection because it has received a message that violates its policy.
sourcepub const MESSAGE_TOO_BIG: Self = _
pub const MESSAGE_TOO_BIG: Self = _
Endpoint is terminating the connection because it has received a message that is too big for it to process.
sourcepub const MANDATORY_EXTENSION: Self = _
pub const MANDATORY_EXTENSION: Self = _
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.
sourcepub const INTERNAL_SERVER_ERROR: Self = _
pub const INTERNAL_SERVER_ERROR: Self = _
Server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
sourcepub const SERVICE_RESTART: Self = _
pub const SERVICE_RESTART: Self = _
Service is restarted. A client may reconnect, and if it choses to do, should reconnect using a randomized delay of 5–30s.
sourcepub const SERVICE_OVERLOAD: Self = _
pub const SERVICE_OVERLOAD: Self = _
Service is experiencing overload. A client should only connect to a different IP (when there are multiple for the target) or reconnect to the same IP upon user action.
sourcepub const BAD_GATEWAY: Self = _
pub const BAD_GATEWAY: Self = _
The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to the HTTP 502 status code.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)