pub struct MarketDispatchEntry {
pub prefix: &'static str,
pub sec_market: i32,
pub qot_market: u32,
pub exchange_str: &'static str,
}Expand description
Stable API (since v1.4.69) — 市场 dispatch 表 entry(跨 crate 共享)。
合并 3 个 fn 的重复 match case:
sec_market_from_code_prefix(prefix → sec_market)sec_market_to_qot_market(sec_market → qot_market)sec_market_to_exchange_str(sec_market → exchange_str)
每 entry 覆盖一个 market family(9 个标准市场)。新加市场只需加表一行, 3 个 helper 自动支持(vs 之前 3 处独立 match 容易漏 case)。
CN 特例:CN prefix 没有标 sec_market(由 code 首数字判 SH(31) vs
SZ(32)),因此 prefix == "CN." 的 entry 不放表里,sec_market_from_code_prefix
对 CN. 单独处理。
Fields§
§prefix: &'static str§sec_market: i32§qot_market: u32§exchange_str: &'static strAuto Trait Implementations§
impl Freeze for MarketDispatchEntry
impl RefUnwindSafe for MarketDispatchEntry
impl Send for MarketDispatchEntry
impl Sync for MarketDispatchEntry
impl Unpin for MarketDispatchEntry
impl UnsafeUnpin for MarketDispatchEntry
impl UnwindSafe for MarketDispatchEntry
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