pub enum QotSubError {
BackendRejected {
result: i32,
warning: i32,
},
DecodeFailed(String),
Transport(FutuError),
UnsupportedMarket {
offending: Vec<i32>,
},
PartialMarketFailure {
succeeded: Vec<u8>,
failed: Vec<u8>,
},
}Expand description
v1.4.106 codex 1131 F1: submit_global_desired_set 错误类型.
让 caller (SubHandler) 区分 backend reject vs decode err vs timeout →
ack-then-commit pattern (F1 P1).
Variants§
BackendRejected
backend 返了 SubscribeSetRsp.result != 0 (reject), 携带 result 数 + warning.
DecodeFailed(String)
响应 decode 失败 — 该批次状态未知, 不写 local state.
Transport(FutuError)
网络 / TCP 错误 (timeout / 连接断). 透传 inner.
UnsupportedMarket
v1.4.106 codex 0631 F3 [P2]: caller 传了一个 backend 不识别的
ftapi_market (ftapi_market_to_quote_mkt → 0). 防御性 fail loud:
不发任何 CMD6211, 整批 reject. caller 应早 validate 后再调.
携带 offending list 让 caller 报清晰错给用户.
PartialMarketFailure
v1.4.106 codex 0631 F3 [P2]: 多 market 分批发送时, 部分市场 backend 失败 (BackendRejected / DecodeFailed) 但其它 OK — 该批次 是部分应用 (split state). caller 不能当全成功, 需明示用户 “succeeded markets 已生效, failed 需重发”.
Trait Implementations§
Source§impl Debug for QotSubError
impl Debug for QotSubError
Source§impl Display for QotSubError
impl Display for QotSubError
Source§impl Error for QotSubError
impl Error for QotSubError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for QotSubError
impl !RefUnwindSafe for QotSubError
impl Send for QotSubError
impl Sync for QotSubError
impl Unpin for QotSubError
impl UnsafeUnpin for QotSubError
impl !UnwindSafe for QotSubError
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.