#[non_exhaustive]pub enum WsEvent {
Subscribed(Arg),
Unsubscribed(Arg),
Login,
Error {
code: String,
msg: String,
},
Notice(WsNotice),
ChannelConnectionCount(WsChannelConnectionCount),
ChannelConnectionCountError(WsChannelConnectionCount),
Operation(WsOperation),
Push(Push),
Reconnected,
Disconnected,
}Expand description
A WebSocket event surfaced by OkxWs::next_event.
OKX docs: https://www.okx.com/docs-v5/en/#overview-websocket
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Subscribed(Arg)
Subscription acknowledgement.
Unsubscribed(Arg)
Unsubscription acknowledgement.
Login
Private login acknowledgement.
Error
OKX WebSocket error event.
Notice(WsNotice)
WebSocket service notice, usually for service upgrades.
ChannelConnectionCount(WsChannelConnectionCount)
Connection-count notification for channels with connection limits.
ChannelConnectionCountError(WsChannelConnectionCount)
Connection-count limit error. The server terminated this channel subscription.
Operation(WsOperation)
WebSocket operation response, e.g. order placement or cancellation.
Push(Push)
Channel data push.
Reconnected
The client reconnected and started subscription recovery.
Disconnected
The remote side closed the connection.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WsEvent
impl RefUnwindSafe for WsEvent
impl Send for WsEvent
impl Sync for WsEvent
impl Unpin for WsEvent
impl UnsafeUnpin for WsEvent
impl UnwindSafe for WsEvent
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