pub enum CurrencyValidation {
Ok,
Missing {
broker_label: &'static str,
supported_label_list: Vec<&'static str>,
},
Unsupported {
broker_label: &'static str,
supported_label_list: Vec<&'static str>,
},
Unknown,
}Expand description
Layer A 校验结果 (用 enum 让 caller 区分四种状态)
Variants§
Ok
requested currency 在 broker supported set 内 → OK 发 backend. SingleCurrency 缺 currency 也归 Ok (跟 C++ legacy 分支一致).
Missing
v1.4.106 Finding F1: Futures / Universal 账户必传 currency,
未传 → loud reject (对齐 C++ CheckReqParams_GetFunds:
if (!c2s.has_currency()) return false;).
SingleCurrency 缺 currency 不进此分支, 仍归 Ok.
Unsupported
requested currency 不在 set 内 → 立即 reject (不发 backend) 含 broker 标签 + supported list 用于 error message
Unknown
无法判断 (security_firm=None / cache miss / unknown broker) — 不 hard reject, 让 backend 决定. 仍记录 hint 用于日志.
Trait Implementations§
Source§impl Clone for CurrencyValidation
impl Clone for CurrencyValidation
Source§fn clone(&self) -> CurrencyValidation
fn clone(&self) -> CurrencyValidation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CurrencyValidation
impl Debug for CurrencyValidation
Source§impl PartialEq for CurrencyValidation
impl PartialEq for CurrencyValidation
impl Eq for CurrencyValidation
impl StructuralPartialEq for CurrencyValidation
Auto Trait Implementations§
impl Freeze for CurrencyValidation
impl RefUnwindSafe for CurrencyValidation
impl Send for CurrencyValidation
impl Sync for CurrencyValidation
impl Unpin for CurrencyValidation
impl UnsafeUnpin for CurrencyValidation
impl UnwindSafe for CurrencyValidation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more