pub struct AccountRow {
pub gateway: String,
pub alias: String,
pub broker_id: String,
pub account: String,
pub md_source: bool,
pub form: CtpForm,
pub stage: AccountStage,
pub fail_note: Option<String>,
pub effective_classes: Vec<String>,
pub connected: bool,
}Expand description
账户行(多账号面;规划 §5.B + 0.2.18 四态)。
界面是账户清单的唯一事实源(不新增“账户注册表“插件):
网关实例的在场由 svctl.list 回填,身份与凭据留在这一行,每账户一份 form
(旧「全界面共享一张表单」已退役 → 消 U4 凭据串味 / U6 取消编辑不清空)。
Fields§
§gateway: String派生注册名(ctp_<broker>_<账号>;寻址唯一用这个,别名不参与)。
alias: String用户别名(显示用,可空 = 回退账号;唯一性由 add_account 校验,规划 Q3)。
broker_id: String§account: String§md_source: bool是否行情元账号(全局单源——用户裁定“单数据源“;已装配后锁定,规划 D3)。
form: CtpForm该账户自己的表单留档(编辑弹窗回填用;密码只存内存,裁定 2:不持久化)。
stage: AccountStage装配四态(规划 §3.3)。
fail_note: Option<String>装配失败原因(AssembleFailed 时留显形;成功即清空)。
effective_classes: Vec<String>网关实际收录回带值(ConfigureReply.product_classes,规划 U9)。
与 form.accept_*(用户勾选)并排显示:勾选是意图,这一栏是事实。
空 = 尚未装配过或旧版网关未回带。
connected: bool在场位(由 svctl.list 快照回填:该注册名在不在 = 实例已装配)。
诚实边界:登录成败 ek-ctp 无状态口可查(规划 §10 开放项),界面不谎称“已连接“。
Implementations§
Trait Implementations§
Source§impl Clone for AccountRow
impl Clone for AccountRow
Source§impl Debug for AccountRow
impl Debug for AccountRow
Source§impl Default for AccountRow
impl Default for AccountRow
Source§impl PartialEq for AccountRow
impl PartialEq for AccountRow
impl StructuralPartialEq for AccountRow
Auto Trait Implementations§
impl Freeze for AccountRow
impl RefUnwindSafe for AccountRow
impl Send for AccountRow
impl Sync for AccountRow
impl Unpin for AccountRow
impl UnsafeUnpin for AccountRow
impl UnwindSafe for AccountRow
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.