pub struct SubscriptionManager { /* private fields */ }Expand description
订阅管理器
Implementations§
Source§impl SubscriptionManager
impl SubscriptionManager
pub fn new() -> Self
pub fn subscribe_notify(&self, conn_id: u64)
pub fn unsubscribe_notify(&self, conn_id: u64)
pub fn is_subscribed_notify(&self, conn_id: u64) -> bool
pub fn subscribe_trd_acc(&self, conn_id: u64, acc_id: u64)
pub fn unsubscribe_trd_acc(&self, conn_id: u64, acc_id: u64)
pub fn get_acc_subscribers(&self, acc_id: u64) -> Vec<u64>
Sourcepub fn subscribe_qot(&self, conn_id: u64, security_key: &str, sub_type: i32)
pub fn subscribe_qot(&self, conn_id: u64, security_key: &str, sub_type: i32)
订阅行情
Sourcepub fn unsubscribe_qot(&self, conn_id: u64, security_key: &str, sub_type: i32)
pub fn unsubscribe_qot(&self, conn_id: u64, security_key: &str, sub_type: i32)
退订行情
Sourcepub fn get_qot_subscribers(&self, security_key: &str, sub_type: i32) -> Vec<u64>
pub fn get_qot_subscribers(&self, security_key: &str, sub_type: i32) -> Vec<u64>
获取订阅了指定行情的连接列表
Sourcepub fn get_conn_used_quota(&self, conn_id: u64) -> u32
pub fn get_conn_used_quota(&self, conn_id: u64) -> u32
获取连接的已用订阅额度
Sourcepub fn get_total_used_quota(&self) -> u32
pub fn get_total_used_quota(&self) -> u32
获取总已用额度
Sourcepub fn get_conn_qot_subs(&self, conn_id: u64) -> HashMap<i32, Vec<String>>
pub fn get_conn_qot_subs(&self, conn_id: u64) -> HashMap<i32, Vec<String>>
获取指定连接订阅的行情列表: sub_type → Vec<security_key>
Sourcepub fn get_all_qot_conn_ids(&self) -> HashSet<u64>
pub fn get_all_qot_conn_ids(&self) -> HashSet<u64>
获取所有连接 ID(有行情订阅的)
pub fn on_disconnect(&self, conn_id: u64)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SubscriptionManager
impl !RefUnwindSafe for SubscriptionManager
impl Send for SubscriptionManager
impl Sync for SubscriptionManager
impl Unpin for SubscriptionManager
impl UnwindSafe for SubscriptionManager
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