Skip to main content

UiCmd

Enum UiCmd 

Source
pub enum UiCmd {
    Start {
        factory: String,
        name: String,
    },
    Remove {
        name: String,
    },
    Reload {
        interval: i64,
        symbol: String,
        bars: Vec<BarData>,
    },
    SendOrder {
        req: OrderRequest,
        gateway: String,
        mode: LockMode,
    },
    CancelOrder {
        orderid: String,
        gateway: String,
    },
    CtpConfigure {
        gateway: String,
        form: CtpForm,
    },
    Connect {
        gateway: String,
        form: CtpForm,
    },
    CtpSubscribe {
        gateway: String,
        symbols: Vec<String>,
    },
    Disconnect {
        gateway: String,
    },
    CfgList,
    CfgDelete {
        ns: String,
    },
    CfgResave {
        ns: String,
    },
}
Expand description

UI 操作指令(窗口面 → 总线面;eTimer 节拍被 ui 插件请辞)。

Variants§

§

Start

svctl.start(工厂名 + 实例注册名;name 空 = 旧行为,工厂名即注册名)。 多账号面:factory="ctp" + name=ctp_<broker>_<账号> 建第 N 个网关实例。

Fields

§factory: String
§name: String
§

Remove

svctl.remove(插件名)。

Fields

§name: String
§

Reload

dm.reload 回灌(S4;push=true 逐条广播,行情面板实时见 Rows)。

Fields

§interval: i64
§symbol: String
§bars: Vec<BarData>
§

SendOrder

下单(S5;网关受理即 SUBMITTING 单上总线)。 S6 起网关可选(gateway.send_order,空 = ctp)。 0.1.1(BD-UI-30):改走 oms.submit_order 五段管线(拆单/风控/逐腿 发送/记账,parent 聚合);mode = 拆单四态(勾选「自动开平」= Auto, 取消勾选 = None 原样旁路)。

Fields

§gateway: String
§

CancelOrder

撤单(S5;携三段号所需的 orderid;S6 起网关同选)。 0.1.1(BD-UI-30):改走 oms.cancel_order(守卫 4000 不可绕过; symbol/exchange 由 oms 订单缓存解,不再随令携带)。

Fields

§orderid: String
§gateway: String
§

CtpConfigure

{gw}.configure 账户配置(多账号面:网关名随令携带,不再硬编码 ctp; 出队时 to_configure_req 抬成线上契约)。 0.2.18 起界面侧不再用它装配账户(装配走 Connect);保留作低层口与测试面。

Fields

§gateway: String
§form: CtpForm
§

Connect

四态分离的「连接」(0.2.18,规划裁定:添加 ≠ 连接): 一次做完 svctl.start(factory=ctp) + {gw}.configure,结果回写账户行 (Assembling → Assembled / AssembleFailed)。界面『连接』『重试』钮走这一条, 『添加账户』只写清册(不再一键装配 → 失败不会留下“注定被拒“的半死行)。

Fields

§gateway: String
§form: CtpForm
§

CtpSubscribe

{gw}.subscribe 订阅行情(多账号面:一律路由到行情元账号, 从账号没有 MD 会话,发给它只会静默成功 —— 见规划 §5.C / §9.4-21)。

Fields

§gateway: String
§symbols: Vec<String>
§

Disconnect

{gw}.disconnect 停会话(0.2.19,规划裁定 1:断开 ≠ 移除): 网关实例、账号配置、订阅集、状态计数全保留,『连接/重试』可恢复(重登自动重订阅)。 『移除』走的 UiCmd::Remove(svctl.remove)才是停实例 —— 两个动作不得混成一个。

Fields

§gateway: String
§

CfgList

配置托底:段目录刷新(cfg.list;0.6.0 环节8,BD-CFG-17 零值面)。

§

CfgDelete

配置托底:清段(cfg.delete,ns + 空整段语义;运维窗操作,与文件回缺省)

Fields

§

CfgResave

配置托底:重存段(cfg.save;从明面重读 → serialize → store, 值不变 —— 修 rev/格式,持久挂久节奏验证面;0.6.0 环节8)。

Fields

Trait Implementations§

Source§

impl Clone for UiCmd

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UiCmd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for UiCmd

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UiCmd

Auto Trait Implementations§

§

impl Freeze for UiCmd

§

impl RefUnwindSafe for UiCmd

§

impl Send for UiCmd

§

impl Sync for UiCmd

§

impl Unpin for UiCmd

§

impl UnsafeUnpin for UiCmd

§

impl UnwindSafe for UiCmd

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more