pub enum SecurityInfoSource {
StockListFull,
OnDemandBasic,
Bootstrap,
}Expand description
v1.4.106 codex 1148 F7 (P2): cache row “完整度 / 来源” 标记。
此 enum 区分一个 CachedSecurityInfo 是从 stock-list 完整 sync 来的
(字段全), 还是 subscribe on-demand CMD 20106 临时补的 (大量字段为空)。
GetStaticInfo / GetSecuritySnapshot / make_static_info 等需要完整
静态字段的路径在收到 OnDemandBasic 行时应触发完整 stock-list /
20106 completed refresh, 或明确返 partial / unavailable, 不假装完整数据。
来源 audit: codex/2026-05-01-1148-v1.4.106-codex-qot-static-data-review.md
Finding 7。
Variants§
StockListFull
来自 backend stock-list full sync (含 list_time / warrnt_stock_owner / exch_type / no_search 等所有字段, 是权威数据)。
OnDemandBasic
来自 subscribe / GetStaticInfo / GetSecuritySnapshot 的 on-demand CMD 20106 临时补行 — 仅含 stock_id / market / mkt_id / code / name / lot_size / sec_type, 其余字段缺省 (list_time=“”, warrnt_stock_owner=0, exch_type=0, no_search=false)。不应当作权威静态数据源。
作 Default: 保守策略 — 历史 caller 漏标 source 时, 当 partial 处理 (is_complete()=false), 后续 stock_list_sync / Bootstrap 自动覆写为权威 来源。这样 cache miss → on-demand fetch → 默认 source = OnDemandBasic 不会被误当 StockListFull 权威数据消费。
Bootstrap
SQLite bootstrap reload (启动时从本地数据库恢复)。字段完整度同
StockListFull (因为 SQLite 是上次 full sync 的快照), 但生命期更长
(跨 daemon 重启)。一般 caller 当 StockListFull 处理。
Implementations§
Source§impl SecurityInfoSource
impl SecurityInfoSource
Sourcepub fn is_complete(self) -> bool
pub fn is_complete(self) -> bool
是否含完整静态字段 (list_time / warrnt_stock_owner / exch_type /
no_search 等)。OnDemandBasic 缺这些, 其他 source 都齐。
Trait Implementations§
Source§impl Clone for SecurityInfoSource
impl Clone for SecurityInfoSource
Source§fn clone(&self) -> SecurityInfoSource
fn clone(&self) -> SecurityInfoSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecurityInfoSource
impl Debug for SecurityInfoSource
Source§impl Default for SecurityInfoSource
impl Default for SecurityInfoSource
Source§fn default() -> SecurityInfoSource
fn default() -> SecurityInfoSource
Source§impl PartialEq for SecurityInfoSource
impl PartialEq for SecurityInfoSource
impl Copy for SecurityInfoSource
impl Eq for SecurityInfoSource
impl StructuralPartialEq for SecurityInfoSource
Auto Trait Implementations§
impl Freeze for SecurityInfoSource
impl RefUnwindSafe for SecurityInfoSource
impl Send for SecurityInfoSource
impl Sync for SecurityInfoSource
impl Unpin for SecurityInfoSource
impl UnsafeUnpin for SecurityInfoSource
impl UnwindSafe for SecurityInfoSource
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
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
§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
§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
key and return true if they are equal.