#[repr(u16)]pub enum WebSocketCloseCode {
Clean = 1_000,
Leaving = 1_001,
ProtocolError = 1_002,
Error = 1_011,
AuthFailed = 4_106,
AuthTimeout = 4_107,
Kicked = 4_108,
RoomFull = 4_109,
}Expand description
websocket close code vocabulary shared by server and browser protocol code
standard codes keep their RFC meaning custom codes mirror the legacy Odoo SFU websocket close vocabulary used by browser clients and low-cardinality telemetry
Variants§
Clean = 1_000
normal websocket closure
Leaving = 1_001
the peer is leaving
ProtocolError = 1_002
the peer sent a malformed or invalid protocol message
Error = 1_011
the server hit an internal error while handling the socket
AuthFailed = 4_106
authentication failed
AuthTimeout = 4_107
the client did not authenticate before the server timeout
Kicked = 4_108
the runtime removed this client from the room
RoomFull = 4_109
admission failed because the room cannot accept another user
Implementations§
Trait Implementations§
Source§impl Clone for WebSocketCloseCode
impl Clone for WebSocketCloseCode
Source§fn clone(&self) -> WebSocketCloseCode
fn clone(&self) -> WebSocketCloseCode
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 WebSocketCloseCode
impl Debug for WebSocketCloseCode
Source§impl From<WebSocketCloseCode> for u16
impl From<WebSocketCloseCode> for u16
Source§fn from(value: WebSocketCloseCode) -> Self
fn from(value: WebSocketCloseCode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WebSocketCloseCode
impl PartialEq for WebSocketCloseCode
impl Copy for WebSocketCloseCode
impl Eq for WebSocketCloseCode
impl StructuralPartialEq for WebSocketCloseCode
Auto Trait Implementations§
impl Freeze for WebSocketCloseCode
impl RefUnwindSafe for WebSocketCloseCode
impl Send for WebSocketCloseCode
impl Sync for WebSocketCloseCode
impl Unpin for WebSocketCloseCode
impl UnsafeUnpin for WebSocketCloseCode
impl UnwindSafe for WebSocketCloseCode
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