pub struct QotRightCache { /* private fields */ }Implementations§
Source§impl QotRightCache
impl QotRightCache
pub fn apply_6651_changes(&self, items: &[(i32, i32, i32)]) -> Vec<i32>
pub fn apply_direct_auth_changes(&self, items: &[(i32, u32)]) -> Vec<i32>
Sourcepub fn apply_6006_auth_changes_if_source(
&self,
expected_generation: u64,
source_publication_epoch: u64,
items: &[(i32, u32)],
cn_after: Option<u32>,
) -> Option<Vec<i32>>
pub fn apply_6006_auth_changes_if_source( &self, expected_generation: u64, source_publication_epoch: u64, items: &[(i32, u32)], cn_after: Option<u32>, ) -> Option<Vec<i32>>
Applies one legacy CMD6006 partial authorization push without reclassifying it as a full CMD6024 snapshot.
A current route may update an unowned cold cache (provenance remains
None) or the full snapshot produced by that same publication epoch.
It may never graft a new-route push onto facts owned by another epoch.
Sourcepub fn update_from_backend(
&self,
update: QotRightBackendUpdate,
) -> QotRightBackendApplyOutcome
pub fn update_from_backend( &self, update: QotRightBackendUpdate, ) -> QotRightBackendApplyOutcome
从后端 CMD 6024 响应更新权限数据.
v1.4.106 codex 1217 F2 [P1] (5月1日): us_future_detail 子字段存在 =
覆盖 (含值=0). 之前 if cme > 0 跳过 0 让 LV1 → 0 (No) 实质降级被
silent 保留;但 C++ 逐个 has_open_api_*_auth() 判断,父字段存在不代表
未返回的子市场可按 0 覆盖。
v1.4.106 codex 1217 F1: apply 成功后自动 mark Fresh.
pub fn update_from_backend_if_generation( &self, facts: QotRightFullApplyFacts, update: QotRightBackendUpdate, ) -> Option<QotRightBackendApplyOutcome>
pub fn update_quotas_from_backend_if_generation( &self, expected_generation: u64, update: QotRightBackendUpdate, ) -> Option<QotRightBackendApplyOutcome>
Source§impl QotRightCache
impl QotRightCache
pub fn reconnect_lifecycle_snapshot(&self) -> QotRightReconnectLifecycle
pub fn register_reconnect_pending( &self, expected_generation: u64, contribution: QotRightReconnectAccumulator, ) -> Option<QotRightReconnectRegistration>
pub fn reserve_reconnect_deferred( &self, expected_generation: u64, contribution: QotRightReconnectAccumulator, ) -> Option<QotRightReconnectRegistration>
pub fn deferred_reconnect_is_active( &self, token: QotRightReconnectToken, generation: u64, ) -> bool
Sourcepub fn admit_deferred_reconnect_dispatch(
&self,
token: QotRightReconnectToken,
generation: u64,
) -> bool
pub fn admit_deferred_reconnect_dispatch( &self, token: QotRightReconnectToken, generation: u64, ) -> bool
Linearize a Subscribe CMD6211 writer admission against entitlement
pushes. A push that moved the exact owner to Pending before this call
wins and rejects the send. Once the first CMD6211 command is admitted,
later same-generation pushes merge into the deferred owner without
disconnecting the route before its ACK transaction completes.
pub fn reconnect_claim_is_active( &self, token: QotRightReconnectToken, generation: u64, ) -> bool
pub fn pending_reconnect_is_active( &self, token: QotRightReconnectToken, generation: u64, ) -> bool
Sourcepub fn freeze_reconnect_request_claim(
&self,
token: QotRightReconnectToken,
generation: u64,
) -> Option<QotRightReconnectClaim>
pub fn freeze_reconnect_request_claim( &self, token: QotRightReconnectToken, generation: u64, ) -> Option<QotRightReconnectClaim>
Freeze the active reconnect accumulator at request-send time. Delayed
entitlement follow-ups absorb every contribution received during the
1s C++ spacing window into the serving request; contributions arriving
after this transaction remain in follow_up for the next generation.
pub fn commit_deferred_reconnect_after_ack<T>( &self, token: QotRightReconnectToken, generation: u64, commit: impl FnOnce() -> T, ) -> Option<T>
pub fn fail_deferred_reconnect( &self, token: QotRightReconnectToken, generation: u64, ) -> bool
Sourcepub fn promote_deferred_reconnect_for_request_failure(
&self,
token: QotRightReconnectToken,
generation: u64,
) -> bool
pub fn promote_deferred_reconnect_for_request_failure( &self, token: QotRightReconnectToken, generation: u64, ) -> bool
Promote a refresh-created reservation when the enclosing subscription
request fails, whether backend dispatch was admitted or not. The rights
change still requires the same generation-fenced reconnect; leaving the
owner in Deferred would strand that reconnect forever.
Sourcepub fn begin_reconnect_handoff(&self) -> QotRightReconnectHandoff
pub fn begin_reconnect_handoff(&self) -> QotRightReconnectHandoff
Freeze the exact source-generation reconnect owner before any socket retry begins. An ordinary transport failure creates an empty Pending owner; late same-generation entitlement pushes merge into that owner. The successor connection must present this token when claiming the handoff, so an unrelated reconnect loop cannot consume it.
pub fn advance_generation_and_claim_reconnect( &self, handoff: QotRightReconnectHandoff, active_generation: u64, ) -> Option<QotRightReconnectClaim>
pub fn finish_reconnect( &self, token: QotRightReconnectToken, generation: u64, ) -> Option<QotRightReconnectRegistration>
Source§impl QotRightCache
impl QotRightCache
pub fn new() -> Self
pub fn get(&self) -> QotRightData
Sourcepub fn fresh_digital_future_entitlement(
&self,
) -> Option<FreshDigitalFutureEntitlement>
pub fn fresh_digital_future_entitlement( &self, ) -> Option<FreshDigitalFutureEntitlement>
Returns the dedicated digital-futures entitlement and its cache
generation atomically, or None unless the facts are fresh.
pub fn refresh_current_facts(&self) -> QotRightRefreshCurrentFacts
pub fn freshness(&self) -> QotRightFreshness
pub fn is_fresh(&self) -> bool
pub fn meta_snapshot(&self) -> QotRightStateMeta
pub fn take_event_contract_category_preload_request(&self) -> bool
pub fn set_orderbook_depths( &self, hk_option_depth: Option<u32>, hk_future_depth: Option<u32>, )
pub fn mark_stale(&self, reason: &str)
pub fn advance_login_epoch(&self, new_epoch: u64, user_id: Option<u64>)
pub fn advance_backend_generation(&self, new_generation: u64)
pub fn mark_pending(&self)
pub fn mark_pending_if_generation(&self, expected_generation: u64) -> bool
pub fn mark_fresh(&self)
pub fn mark_failed(&self, error: impl Into<String>)
pub fn mark_failed_if_generation( &self, expected_generation: u64, error: impl Into<String>, ) -> bool
pub fn last_refresh_at_ms(&self) -> i64
pub fn set_pushed_quote_change_notify(&self, notify: PushedQuoteChangeNotify)
pub fn pushed_quote_change_notify(&self) -> Option<PushedQuoteChangeNotify>
pub fn pushed_quote_change_notify_snapshot( &self, ) -> (u64, Option<PushedQuoteChangeNotify>)
Trait Implementations§
Source§impl Clone for QotRightCache
impl Clone for QotRightCache
Source§fn clone(&self) -> QotRightCache
fn clone(&self) -> QotRightCache
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for QotRightCache
impl !UnwindSafe for QotRightCache
impl Freeze for QotRightCache
impl Send for QotRightCache
impl Sync for QotRightCache
impl Unpin for QotRightCache
impl UnsafeUnpin for QotRightCache
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<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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more