pub struct QotRightCache { /* private fields */ }Expand description
行情权限缓存
Implementations§
Source§impl QotRightCache
impl QotRightCache
pub fn new() -> Self
Sourcepub fn get(&self) -> QotRightData
pub fn get(&self) -> QotRightData
获取当前权限数据的快照
Sourcepub fn update_from_backend(
&self,
hk_got: Option<u32>,
us_got: Option<u32>,
cn_got: Option<u32>,
sh_auth: Option<u32>,
sz_auth: Option<u32>,
hk_option: Option<u32>,
hk_future: Option<u32>,
us_option: Option<u32>,
us_future_cme_cboe: Option<u32>,
us_future_detail: Option<(u32, u32, u32, u32)>,
sg_future: Option<u32>,
jp_future: Option<u32>,
sub_limit: Option<u32>,
kl_limit: Option<u32>,
)
pub fn update_from_backend( &self, hk_got: Option<u32>, us_got: Option<u32>, cn_got: Option<u32>, sh_auth: Option<u32>, sz_auth: Option<u32>, hk_option: Option<u32>, hk_future: Option<u32>, us_option: Option<u32>, us_future_cme_cboe: Option<u32>, us_future_detail: Option<(u32, u32, u32, u32)>, sg_future: Option<u32>, jp_future: Option<u32>, sub_limit: Option<u32>, kl_limit: Option<u32>, )
从后端 CMD 6024 响应更新权限数据
对齐 C++:
- ParseQotRightReply_HK / _US / _CN / _HKOption / _HKFuture 等
- ParseQotRightReply_APIQuota
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for QotRightCache
impl !RefUnwindSafe for QotRightCache
impl Send for QotRightCache
impl Sync for QotRightCache
impl Unpin for QotRightCache
impl UnwindSafe for QotRightCache
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