Skip to main content

QotRightCache

Struct QotRightCache 

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

Implementations§

Source§

impl QotRightCache

Source

pub fn new() -> Self

Source

pub fn get(&self) -> QotRightData

Source

pub fn freshness(&self) -> QotRightFreshness

Source

pub fn is_fresh(&self) -> bool

Source

pub fn meta_snapshot(&self) -> QotRightStateMeta

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_fresh(&self)

Source

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

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 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)

从后端 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.

Trait Implementations§

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> 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, 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