#[non_exhaustive]pub enum WsEvent {
Show 15 variants
Authenticated,
Subscribed(Value),
Unsubscribed(Value),
Ticker(TickerEvent),
Ticker24h(Vec<Ticker24h>),
Candle(CandleEvent),
Trade(TradeEvent),
Book(BookEvent),
Order(OrderEvent),
Fill(FillEvent),
Response {
action: String,
response: Value,
},
Error {
code: i64,
message: String,
},
ConnectionError {
operation: WsConnectionOperation,
error: Arc<Error>,
},
Closed,
Unknown(Value),
}Expand description
Event received from the WebSocket connection.
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.
Authenticated
Authentication succeeded.
Subscribed(Value)
Subscription confirmation with the active subscriptions.
Unsubscribed(Value)
Unsubscription confirmation with the remaining subscriptions.
Ticker(TickerEvent)
Update on the ticker channel.
Ticker24h(Vec<Ticker24h>)
Update on the ticker24h channel.
Candle(CandleEvent)
Update on the candles channel.
Trade(TradeEvent)
Update on the trades channel.
Book(BookEvent)
Order book delta on the book channel.
Order(OrderEvent)
Order update on the account channel.
Fill(FillEvent)
Fill on the account channel.
Response
Response to a request sent over the socket, for example getBook.
Error
Error message from the server.
ConnectionError
Transport or TLS error on an established connection.
Closed
The connection was closed and no further events will arrive.
Unknown(Value)
A message that did not match any known shape.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WsEvent
impl !UnwindSafe for WsEvent
impl Freeze for WsEvent
impl Send for WsEvent
impl Sync for WsEvent
impl Unpin for WsEvent
impl UnsafeUnpin 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