pub enum WebSocketState {
None = 0,
Connecting = 1,
Open = 2,
CloseSent = 3,
CloseReceived = 4,
Closed = 5,
Aborted = 6,
}
Expand description
The state of the websocket
Variants§
None = 0
The websocket has been created with new_client()
or new_server()
Connecting = 1
The client has created an opening handshake
Open = 2
The server has completed the opening handshake via server_accept() or, likewise, the
client has completed the opening handshake via client_accept(). The user is free to call
write()
, read()
or close()
on the websocket
CloseSent = 3
The close()
function has been called
CloseReceived = 4
A Close websocket frame has been received
Closed = 5
The close handshake has been completed
Aborted = 6
The server or client opening handshake failed
Trait Implementations§
Source§impl Clone for WebSocketState
impl Clone for WebSocketState
Source§fn clone(&self) -> WebSocketState
fn clone(&self) -> WebSocketState
Returns a copy 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 WebSocketState
impl Debug for WebSocketState
Source§impl PartialEq for WebSocketState
impl PartialEq for WebSocketState
impl Copy for WebSocketState
impl Eq for WebSocketState
impl StructuralPartialEq for WebSocketState
Auto Trait Implementations§
impl Freeze for WebSocketState
impl RefUnwindSafe for WebSocketState
impl Send for WebSocketState
impl Sync for WebSocketState
impl Unpin for WebSocketState
impl UnwindSafe for WebSocketState
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