pub enum WebSocketState {
None,
Connecting,
Open,
CloseSent,
CloseReceived,
Closed,
Aborted,
}
Expand description
The state of the websocket
Variants§
None
The websocket has been created with new_client()
or new_server()
Connecting
The client has created an opening handshake
Open
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
The close()
function has been called
CloseReceived
A Close websocket frame has been received
Closed
The close handshake has been completed
Aborted
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<WebSocketState> for WebSocketState
impl PartialEq<WebSocketState> for WebSocketState
source§fn eq(&self, other: &WebSocketState) -> bool
fn eq(&self, other: &WebSocketState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for WebSocketState
impl Eq for WebSocketState
impl StructuralEq for WebSocketState
impl StructuralPartialEq for WebSocketState
Auto Trait Implementations§
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