Skip to main content

TdOut

Enum TdOut 

Source
pub enum TdOut {
Show 19 variants ReqConnect { addr: String, flow_path: String, }, ReqAuthenticate { user: String, broker: String, auth_code: String, app_id: String, }, ReqLogin { user: String, password: String, broker: String, }, ReqSettlementConfirm { broker: String, user: String, }, ReqQryInstrument, ReqQryAccount { broker: String, user: String, }, ReqQryPosition { broker: String, user: String, }, Insert(InputOrder), Cancel(InputOrderAction), Contract(ContractData), Order(OrderData), Trade(TradeData), Position(PositionData), PositionQueryDone(String), ContractFinish(String), Account(AccountData), AccountQueryDone(String), Log(LogData), Status(GatewayChange),
}
Expand description

TD 输出动作。

Variants§

§

ReqConnect

创建/连接交易 API(779 前流程:connect() 749-777)

Fields

§addr: String

交易前置地址

§flow_path: String

流文件目录尾段({gateway_name}\Td)

§

ReqAuthenticate

reqAuthenticate(779-792)

Fields

§user: String

用户代码

§broker: String

经纪公司代码

§auth_code: String

授权编码

§app_id: String

产品名称(AppID)

§

ReqLogin

reqUserLogin(794-806)

Fields

§user: String

用户代码

§password: String

密码

§broker: String

经纪公司代码

§

ReqSettlementConfirm

reqSettlementInfoConfirm(482-485)

Fields

§broker: String

经纪公司代码

§user: String

用户代码

§

ReqQryInstrument

reqQryInstrument(合约流控重试在 transport 层,DESIGN.md D-FLCN)

§

ReqQryAccount

reqQryTradingAccount(874-877)

Fields

§broker: String

经纪公司代码

§user: String

用户代码

§

ReqQryPosition

reqQryInvestorPosition(879-887)

Fields

§broker: String

经纪公司代码

§user: String

用户代码

§

Insert(InputOrder)

reqOrderInsert(820-845 成功路径)

§

Cancel(InputOrderAction)

reqOrderAction(856-872 成功路径)

§

Contract(ContractData)

上抛合约(仅期货;经 gateway.on_contract 652)

§

Order(OrderData)

上抛订单(经 gateway.on_order)

§

Trade(TradeData)

上抛成交(经 gateway.on_trade)

§

Position(PositionData)

上抛持仓(合并完成;经 gateway.on_position 589-590)

§

PositionQueryDone(String)

持仓查询完成(原稿 593 行 EVENT_POSITION_QUERY_DONE;对齐 ek-oms 相位门)

§

ContractFinish(String)

合约收齐(原稿 659 → BaseGateway.on_contract_finish → 0.10.5 起常量 EVENT_CONTRACT_FINISH) = 全局线、无 gw 后缀;载荷给网关名以便多网关辨源,D-CFIN)

§

Account(AccountData)

上抛账户(612)

§

AccountQueryDone(String)

资金查询完成(0.9.5 新增):三条查询路谁收到 last 谁就推自己的结束事件 —— 持仓有 ePositionDone.<gw>(原稿 593)、合约有 eContractFinish(原稿 659), 资金这一路原来没有。落线 eAccountDone.<gw>,载荷给网关名(与持仓那一路同式)。

§

Log(LogData)

业务日志

§

Status(GatewayChange)

状态变化(0.11.0 第3刀):链状态机的「那一刻」从 eLog 文本升格成结构化事件。 由插件 worker 折成 eStatus.<gw>(随附整份 GatewayStatus 快照)。

Trait Implementations§

Source§

impl Clone for TdOut

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 TdOut

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for TdOut

§

impl RefUnwindSafe for TdOut

§

impl Send for TdOut

§

impl Sync for TdOut

§

impl Unpin for TdOut

§

impl UnsafeUnpin for TdOut

§

impl UnwindSafe for TdOut

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<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> 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> Same for T

Source§

type Output = T

Should always be Self
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