#[repr(u8)]pub enum WsConnectionState {
Disconnected = 0,
Connecting = 1,
Connected = 2,
Reconnecting = 3,
Error = 4,
}Expand description
WebSocket connection state.
Uses #[repr(u8)] to enable atomic storage via AtomicU8.
Variants§
Disconnected = 0
Not connected
Connecting = 1
Establishing connection
Connected = 2
Successfully connected
Reconnecting = 3
Attempting to reconnect
Error = 4
Error state
Implementations§
Source§impl WsConnectionState
impl WsConnectionState
Sourcepub fn from_u8(value: u8) -> WsConnectionState
pub fn from_u8(value: u8) -> WsConnectionState
Trait Implementations§
Source§impl Clone for WsConnectionState
impl Clone for WsConnectionState
Source§fn clone(&self) -> WsConnectionState
fn clone(&self) -> WsConnectionState
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 WsConnectionState
impl Debug for WsConnectionState
Source§impl PartialEq for WsConnectionState
impl PartialEq for WsConnectionState
impl Copy for WsConnectionState
impl Eq for WsConnectionState
impl StructuralPartialEq for WsConnectionState
Auto Trait Implementations§
impl Freeze for WsConnectionState
impl RefUnwindSafe for WsConnectionState
impl Send for WsConnectionState
impl Sync for WsConnectionState
impl Unpin for WsConnectionState
impl UnwindSafe for WsConnectionState
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