pub enum ResolverErr {
StockIdNotInCache(u64),
SecurityNotInCache {
market: i32,
code: String,
},
UnsupportedMarket(i32),
StockIdZero,
}Expand description
stock_id ↔ Security 解析失败的原因。
调用方据此选择 Reject (loud error) / Refresh (重 trigger) /
PartialResponse (返 partial marker)。
Variants§
StockIdNotInCache(u64)
stock_id 不在反向索引 (id_to_key)。可能是:
- stock-list 还没 sync 到 (启动早期 / SQLite 丢失)
- stock_id 是后端新枚举值, 本地 cache 没收到 push
SecurityNotInCache
Security (market+code) 不在正向索引 (securities)。
- Symbol 还没 subscribe (on-demand fetch 没触发)
- Code 拼写错 (
HK.00700vs1_00700)
UnsupportedMarket(i32)
Security.market 不是 daemon 支持的 enum 值 (e.g. 0 / 99)。
StockIdZero
stock_id == 0 — backend 返空 ID, 这是 silent-success bug 信号。
Trait Implementations§
Source§impl Clone for ResolverErr
impl Clone for ResolverErr
Source§fn clone(&self) -> ResolverErr
fn clone(&self) -> ResolverErr
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 ResolverErr
impl Debug for ResolverErr
Source§impl Display for ResolverErr
impl Display for ResolverErr
Source§impl Error for ResolverErr
impl Error for ResolverErr
1.30.0 · 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()
Source§impl PartialEq for ResolverErr
impl PartialEq for ResolverErr
impl Eq for ResolverErr
impl StructuralPartialEq for ResolverErr
Auto Trait Implementations§
impl Freeze for ResolverErr
impl RefUnwindSafe for ResolverErr
impl Send for ResolverErr
impl Sync for ResolverErr
impl Unpin for ResolverErr
impl UnsafeUnpin for ResolverErr
impl UnwindSafe for ResolverErr
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