#[repr(u8)]pub enum WebSocketConnectionState {
Disconnected = 0,
Connecting = 1,
Connected = 2,
Authenticating = 3,
Authenticated = 4,
Disconnecting = 5,
}Expand description
Unified connection state for all WebSocket trading implementations
This enum provides a standard state machine that can be used across all exchange implementations, ensuring consistent behavior.
Variants§
Disconnected = 0
WebSocket connection is not established
Connecting = 1
WebSocket connection is being established
Connected = 2
WebSocket connection is established but not yet authenticated
Authenticating = 3
WebSocket connection is performing authentication
Authenticated = 4
WebSocket connection is authenticated and ready for trading
Disconnecting = 5
WebSocket connection is gracefully disconnecting
Trait Implementations§
Source§impl Clone for WebSocketConnectionState
impl Clone for WebSocketConnectionState
Source§fn clone(&self) -> WebSocketConnectionState
fn clone(&self) -> WebSocketConnectionState
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebSocketConnectionState
impl Debug for WebSocketConnectionState
Source§impl From<WebSocketConnectionState> for u8
impl From<WebSocketConnectionState> for u8
Source§fn from(state: WebSocketConnectionState) -> Self
fn from(state: WebSocketConnectionState) -> Self
Converts to this type from the input type.
Source§impl From<u8> for WebSocketConnectionState
impl From<u8> for WebSocketConnectionState
Source§impl PartialEq for WebSocketConnectionState
impl PartialEq for WebSocketConnectionState
impl Copy for WebSocketConnectionState
impl Eq for WebSocketConnectionState
impl StructuralPartialEq for WebSocketConnectionState
Auto Trait Implementations§
impl Freeze for WebSocketConnectionState
impl RefUnwindSafe for WebSocketConnectionState
impl Send for WebSocketConnectionState
impl Sync for WebSocketConnectionState
impl Unpin for WebSocketConnectionState
impl UnwindSafe for WebSocketConnectionState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more