pub struct ConfigureReq {
pub broker_id: String,
pub td_addr: String,
pub td_user: String,
pub td_password: SecretString,
pub td_auth_code: String,
pub td_app_id: String,
pub md_addr: String,
pub md_user: String,
pub md_password: SecretString,
pub product_classes: Vec<String>,
}Expand description
网关配置请求(插件自带配置面,2026-10-17 定盘:配置归插件自身, 界面/宿主手工输入经 ask 进来;插件永不读配置文件)。
语义 = 更新账号/前置 + 复位连接守卫 + 立即发起连接(先 TD 后 MD,与
connect 同式)。md_user/md_password 留空回落 td_user/td_password
(SimNow 同账号常态,界面少填两格)。
Debug 手工掩码(0.10.0,BD-CFG-18):td_password/md_password 永远
**** —— 0.9.x 这一路派生 Debug,日志/panic 报文可能带出明文口令。
Fields§
§broker_id: String经纪公司代码
td_addr: String交易前置(空 = 不连 TD;与 md_addr 至少一个非空)
td_user: String交易用户
td_password: SecretString交易密码(内存卫生:SecretString,Debug 掩码 + Drop 擦零)
td_auth_code: String授权编码(空 = 直接登录)
td_app_id: String产品名称(AppID)
md_addr: String行情前置(空 = 不连 MD)
md_user: String行情用户(空回落 td_user)
md_password: SecretString行情密码(空回落 td_password)
product_classes: Vec<String>收录的产品类白名单(CTP 单字符码,如 ["1"];空 = 回落默认「期货」)。
界面勾选面:期货 '1' / 期权 '2'(现货期权 '6' 可配但不在默认勾选里)。
Trait Implementations§
Source§impl Clone for ConfigureReq
impl Clone for ConfigureReq
Source§impl Debug for ConfigureReq
impl Debug for ConfigureReq
Auto Trait Implementations§
impl Freeze for ConfigureReq
impl RefUnwindSafe for ConfigureReq
impl Send for ConfigureReq
impl Sync for ConfigureReq
impl Unpin for ConfigureReq
impl UnsafeUnpin for ConfigureReq
impl UnwindSafe for ConfigureReq
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