pub trait ExternalPushSink: Send + Sync {
// Required methods
fn on_quote_push(
&self,
sec_key: &str,
sub_type: i32,
proto_id: u32,
body: &[u8],
);
fn on_broadcast_push(&self, proto_id: u32, body: &[u8]);
fn on_trade_push(&self, acc_id: u64, proto_id: u32, body: &[u8]);
}Expand description
外部推送接收器 trait
允许外部模块(如 REST WebSocket)接收推送事件, 不引入模块间循环依赖。
Required Methods§
Sourcefn on_broadcast_push(&self, proto_id: u32, body: &[u8])
fn on_broadcast_push(&self, proto_id: u32, body: &[u8])
广播推送 (到价提醒、系统通知等)
Sourcefn on_trade_push(&self, acc_id: u64, proto_id: u32, body: &[u8])
fn on_trade_push(&self, acc_id: u64, proto_id: u32, body: &[u8])
交易推送 (订单更新、成交更新等)