Skip to main content

QotRightCache

Struct QotRightCache 

Source
pub struct QotRightCache { /* private fields */ }

Implementations§

Source§

impl QotRightCache

Source

pub fn reconnect_lifecycle_snapshot(&self) -> QotRightReconnectLifecycle

Source

pub fn register_reconnect_pending( &self, expected_generation: u64, contribution: QotRightReconnectAccumulator, ) -> Option<QotRightReconnectRegistration>

Source

pub fn reserve_reconnect_deferred( &self, expected_generation: u64, contribution: QotRightReconnectAccumulator, ) -> Option<QotRightReconnectRegistration>

Source

pub fn deferred_reconnect_is_active( &self, token: QotRightReconnectToken, generation: u64, ) -> bool

Source

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.

Source

pub fn reconnect_claim_is_active( &self, token: QotRightReconnectToken, generation: u64, ) -> bool

Source

pub fn pending_reconnect_is_active( &self, token: QotRightReconnectToken, generation: u64, ) -> bool

Source

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.

Source

pub fn commit_deferred_reconnect_after_ack<T>( &self, token: QotRightReconnectToken, generation: u64, commit: impl FnOnce() -> T, ) -> Option<T>

Source

pub fn fail_deferred_reconnect( &self, token: QotRightReconnectToken, generation: u64, ) -> bool

Source

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.

Source

pub fn advance_generation_and_claim_reconnect( &self, handoff: QotRightReconnectHandoff, active_generation: u64, ) -> Option<QotRightReconnectClaim>

Source

pub fn finish_reconnect( &self, token: QotRightReconnectToken, generation: u64, ) -> Option<QotRightReconnectRegistration>

Source§

impl QotRightCache

Source

pub fn new() -> Self

Source

pub fn get(&self) -> QotRightData

Source

pub fn refresh_current_facts(&self) -> QotRightRefreshCurrentFacts

Source

pub fn freshness(&self) -> QotRightFreshness

Source

pub fn is_fresh(&self) -> bool

Source

pub fn meta_snapshot(&self) -> QotRightStateMeta

Source

pub fn take_event_contract_category_preload_request(&self) -> bool

Source

pub fn set_orderbook_depths( &self, hk_option_depth: Option<u32>, hk_future_depth: Option<u32>, )

Source

pub fn mark_stale(&self, reason: &str)

Source

pub fn advance_login_epoch(&self, new_epoch: u64, user_id: Option<u64>)

Source

pub fn advance_backend_generation(&self, new_generation: u64)

Source

pub fn mark_pending(&self)

Source

pub fn mark_pending_if_generation(&self, expected_generation: u64) -> bool

Source

pub fn mark_fresh(&self)

Source

pub fn mark_failed(&self, error: impl Into<String>)

Source

pub fn mark_failed_if_generation( &self, expected_generation: u64, error: impl Into<String>, ) -> bool

Source

pub fn last_refresh_at_ms(&self) -> i64

Source

pub fn set_pushed_quote_change_notify(&self, notify: PushedQuoteChangeNotify)

Source

pub fn pushed_quote_change_notify(&self) -> Option<PushedQuoteChangeNotify>

Source

pub fn pushed_quote_change_notify_snapshot( &self, ) -> (u64, Option<PushedQuoteChangeNotify>)

Source

pub fn apply_6651_changes(&self, items: &[(i32, i32, i32)]) -> Vec<i32>

Source

pub fn apply_direct_auth_changes(&self, items: &[(i32, u32)]) -> Vec<i32>

Source

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.

Source

pub fn update_from_backend_if_generation( &self, facts: QotRightFullApplyFacts, update: QotRightBackendUpdate, ) -> Option<QotRightBackendApplyOutcome>

Source

pub fn update_quotas_from_backend_if_generation( &self, expected_generation: u64, update: QotRightBackendUpdate, ) -> Option<QotRightBackendApplyOutcome>

Trait Implementations§

Source§

impl Clone for QotRightCache

Source§

fn clone(&self) -> QotRightCache

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for QotRightCache

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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: Sized + 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<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