pub struct WsPushEvent {
pub event_type: String,
pub required_scope: WsPushScope,
pub proto_id: u32,
pub sec_key: Option<String>,
pub sub_type: Option<i32>,
pub rehab_type: Option<i32>,
pub acc_id: Option<u64>,
pub body_b64: String,
pub trd_market: Option<String>,
}Expand description
WebSocket 推送事件
Fields§
§event_type: String推送类型: “quote”, “trade”, “notify”
required_scope: WsPushScope该事件需要哪个 scope 才能被某个 client 接收(filter 用,不发到客户端)
proto_id: u32协议 ID
sec_key: Option<String>证券标识 (行情推送)
sub_type: Option<i32>订阅类型 (行情推送)
rehab_type: Option<i32>v1.4.106 codex 1131 F4 [P1]: rehab 类型 (KL push 非 0, 其它 sub_type 为 0). 客户端用于 (sec_key, sub_type, rehab_type) 三元 key 自行 filter 不感兴趣的 KL rehab 推送.
acc_id: Option<u64>交易账户 ID (交易推送)
body_b64: Stringprotobuf body 的 base64 编码
trd_market: Option<String>v1.4.105 D3 (Phase 4) T-B1: 交易推送的 trd_market 大写字符串 (“HK” /
“US” / “CN” / “HKCC” / “FUTURES” / “SG” / “AU” / “JP” / “MY” / “CA”).
PushDispatcher 一次 decode body 后透传过来, 让 WS push filter Layer 3
(allowed_markets) 直接读. None = 非 trade event / decode 失败 /
market 未知 (Layer 3 向后兼容不 trigger drop).
客户端可见: trade event 出现 trd_market 字段, qot/notify 不出现
(skip_serializing_if = "Option::is_none").
Trait Implementations§
Source§impl Clone for WsPushEvent
impl Clone for WsPushEvent
Source§fn clone(&self) -> WsPushEvent
fn clone(&self) -> WsPushEvent
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 WsPushEvent
impl Debug for WsPushEvent
Auto Trait Implementations§
impl Freeze for WsPushEvent
impl RefUnwindSafe for WsPushEvent
impl Send for WsPushEvent
impl Sync for WsPushEvent
impl Unpin for WsPushEvent
impl UnsafeUnpin for WsPushEvent
impl UnwindSafe for WsPushEvent
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