longport_wscli/
event.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::WsClientError;

/// The event type of Websocket client
#[derive(Debug)]
pub enum WsEvent {
    /// When a error occurred
    Error(WsClientError),
    /// When the server push a new message
    Push {
        /// Command code
        command_code: u8,
        /// Message body
        body: Vec<u8>,
    },
}