Skip to main content

parse_markets_csv

Function parse_markets_csv 

Source
pub fn parse_markets_csv(s: &str) -> Result<HashSet<String>>
Expand description

解析 --allowed-markets CSV → HashSet<String> (canonical names).

行为:

  • case-insensitive 接入, canonical name 输出 (“HK_FUND” → “HKFUND”)
  • 空 token / trailing comma 跳过
  • 不在 ALLOWED_MARKETS 集合 (含别名) 的 token → loud Err