#[repr(u16)]pub enum WebSocketCloseStatus {
Success = 1_000,
EndpointTerminated = 1_001,
ProtocolError = 1_002,
InvalidDataType = 1_003,
Empty = 1_005,
Aborted = 1_006,
InvalidPayload = 1_007,
PolicyViolation = 1_008,
MessageTooBig = 1_009,
UnsupportedExtensions = 1_010,
ServerError = 1_011,
}Available on crate feature
websocket only.Expand description
WebSocket close status code.
Used with WebSocket::close_typed and
WebSocket::shutdown_typed.
Variants§
Success = 1_000
Normal closure (1000).
EndpointTerminated = 1_001
Endpoint going away (1001).
ProtocolError = 1_002
Protocol error (1002).
InvalidDataType = 1_003
Unsupported data type (1003).
Empty = 1_005
No status code present (1005).
Aborted = 1_006
Abnormal closure (1006).
InvalidPayload = 1_007
Invalid payload data (1007).
PolicyViolation = 1_008
Policy violation (1008).
MessageTooBig = 1_009
Message too big (1009).
UnsupportedExtensions = 1_010
Missing expected extension (1010).
ServerError = 1_011
Server encountered error (1011).
Trait Implementations§
Source§impl Clone for WebSocketCloseStatus
impl Clone for WebSocketCloseStatus
Source§fn clone(&self) -> WebSocketCloseStatus
fn clone(&self) -> WebSocketCloseStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebSocketCloseStatus
impl Debug for WebSocketCloseStatus
Source§impl From<WebSocketCloseStatus> for u16
impl From<WebSocketCloseStatus> for u16
Source§fn from(val: WebSocketCloseStatus) -> u16
fn from(val: WebSocketCloseStatus) -> u16
Converts to this type from the input type.
Source§impl Hash for WebSocketCloseStatus
impl Hash for WebSocketCloseStatus
Source§impl PartialEq for WebSocketCloseStatus
impl PartialEq for WebSocketCloseStatus
Source§impl TryFrom<u16> for WebSocketCloseStatus
impl TryFrom<u16> for WebSocketCloseStatus
impl Copy for WebSocketCloseStatus
impl Eq for WebSocketCloseStatus
impl StructuralPartialEq for WebSocketCloseStatus
Auto Trait Implementations§
impl Freeze for WebSocketCloseStatus
impl RefUnwindSafe for WebSocketCloseStatus
impl Send for WebSocketCloseStatus
impl Sync for WebSocketCloseStatus
impl Unpin for WebSocketCloseStatus
impl UnwindSafe for WebSocketCloseStatus
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