pub struct SecurityWithOpts {
pub stock_id: u64,
pub ftapi_market: i32,
pub sub_types_with_opts: Vec<(i32, SubBitOptions)>,
pub broker_id: Option<NonZeroU32>,
}Expand description
v1.4.106 codex 1131 F1+F2: 单个 (security, sub_types_with_opts) 集合. 让 caller 一次表达 (stock_id, ftapi_market, [(sub_type, SubBitOptions)]).
v1.4.110 Phase 2 Slice 4: 从 3-tuple 升级为 struct, 加 broker_id 字段
让 CMD6211 SecuritySubscribe.broker_id (FTCmdStockQuoteSubData.proto:269,
对齐 C++ MktQotSub.cpp:454-463 SecuritySubscribe::set_broker_id) 真正写
出去. broker_id = None 走 no-broker 路径 (普通股); Some(NonZeroU32)
= crypto multi-broker 隔离.
当前 (Phase 2) 所有 caller 都传 broker_id = None (Phase 3 才在 SubHandler
入口接 securityFirm resolve 写 broker, 见 codex 调研 12:13 增量).
Fields§
§stock_id: u64§ftapi_market: i32§sub_types_with_opts: Vec<(i32, SubBitOptions)>§broker_id: Option<NonZeroU32>v1.4.110 Phase 2 Slice 4: broker-aware 订阅 (C++ StockKey(stockID, brokerID),
见 qot_stock_key.rs Phase 1 doc).
None: C++m_hasBroker = false, CMD6211 不写 broker_id fieldSome(N): C++m_hasBroker = true, CMD6211 写 broker_id = N
Implementations§
Source§impl SecurityWithOpts
impl SecurityWithOpts
Sourcepub fn new(
stock_id: u64,
ftapi_market: i32,
sub_types_with_opts: Vec<(i32, SubBitOptions)>,
) -> Self
pub fn new( stock_id: u64, ftapi_market: i32, sub_types_with_opts: Vec<(i32, SubBitOptions)>, ) -> Self
不带 broker 的快捷构造 (普通股 / 非 crypto).
Sourcepub fn with_broker(
stock_id: u64,
ftapi_market: i32,
sub_types_with_opts: Vec<(i32, SubBitOptions)>,
broker_id: u32,
) -> Self
pub fn with_broker( stock_id: u64, ftapi_market: i32, sub_types_with_opts: Vec<(i32, SubBitOptions)>, broker_id: u32, ) -> Self
带 broker 的快捷构造 (crypto multi-broker). broker_id = 0 自动降级 None.
Trait Implementations§
Source§impl Clone for SecurityWithOpts
impl Clone for SecurityWithOpts
Source§fn clone(&self) -> SecurityWithOpts
fn clone(&self) -> SecurityWithOpts
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 moreAuto Trait Implementations§
impl Freeze for SecurityWithOpts
impl RefUnwindSafe for SecurityWithOpts
impl Send for SecurityWithOpts
impl Sync for SecurityWithOpts
impl Unpin for SecurityWithOpts
impl UnsafeUnpin for SecurityWithOpts
impl UnwindSafe for SecurityWithOpts
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