Skip to main content

QotSubError

Enum QotSubError 

Source
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.

Fields

§result: i32
§warning: i32
§

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 报清晰错给用户.

Fields

§offending: Vec<i32>
§

PartialMarketFailure

v1.4.106 codex 0631 F3 [P2]: 多 market 分批发送时, 部分市场 backend 失败 (BackendRejected / DecodeFailed) 但其它 OK — 该批次 是部分应用 (split state). caller 不能当全成功, 需明示用户 “succeeded markets 已生效, failed 需重发”.

Fields

§succeeded: Vec<u8>
§failed: Vec<u8>

Trait Implementations§

Source§

impl Debug for QotSubError

Source§

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

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

impl Display for QotSubError

Source§

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

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

impl Error for QotSubError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<FutuError> for QotSubError

Source§

fn from(e: FutuError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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.

§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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