pub struct StartupReadiness { /* private fields */ }Implementations§
Source§impl StartupReadiness
impl StartupReadiness
pub fn new_pending() -> Self
pub fn ready(user_id: u64, attribution: Option<i32>) -> Self
Sourcepub fn has_been_ready(&self) -> bool
pub fn has_been_ready(&self) -> bool
是否曾经进入过 Ready(首登成功过)。重连窗口据此区分于首登期。
pub fn snapshot(&self) -> IdentitySnapshot
pub fn subscribe(&self) -> Receiver<IdentitySnapshot>
pub async fn await_init_identity( &self, ) -> Result<IdentitySnapshot, StartupState>
pub async fn await_init_identity_or_cancel<F>( &self, cancelled: F, ) -> Result<Option<IdentitySnapshot>, StartupState>
pub async fn await_pending_init_connects_drained(&self)
pub fn pending_init_connect_count(&self) -> usize
pub fn transition( &self, expected_generation: u64, event: StartupEvent, ) -> Result<IdentitySnapshot, StartupTransitionError>
pub fn allows_proto(&self, proto_id: u32) -> bool
Sourcepub const fn is_subscription_ledger_proto(proto_id: u32) -> bool
pub const fn is_subscription_ledger_proto(proto_id: u32) -> bool
GitHub issue #55 (BUG-v1.7.3-005): Platform 重连窗口内仍放行的订阅账本 proto。
C++ 参照:APIServer/APIServerCS_Core.cpp:108-131 OnRecvClientReq 对客户端
请求只做频控,没有 “gateway 未就绪” gate;APIServer/APIServer_Qot_Sub.cpp →
NNProtoCenter/Quote/MktQotSub.cpp:98-128 SubOrUnSub 在 Platform 断连期间
只写本地 m_listRecord + 起定时器,Timer_SendSubReq (:426-437) 未登录
不发,重连后 GTWCmdAndPushReply.cpp:342-362 → ReSubAll → MktQotSub::ReSub
(:217-280) 从账本重放。Rust 的等价排队语义已在 Qot_Sub handler 内
(route=None 仍本地 commit,重连后 quote_replay 从账本重建 desired set),
因此这三个 proto 在重连窗口不能被 router 挡在门外,否则 SDK
OpenQuoteContext.on_api_socket_reconnected → _reconnect_subscribe 的自动
重订阅会丢,新连接账本缺项 → GetRT / GetKL 本地 IsSub gate 返 “未订阅”。
QOT_SUB(3001):订阅 / 退订都走同一 proto(is_sub_or_un_sub),退订同样 只改账本,重连后重放更小的集合。QOT_REG_QOT_PUSH(3002):纯本地 push 注册。QOT_GET_SUB_INFO(3003):只读账本。
行情拉取 / 交易类 proto 仍被拒(它们需要活的 backend route);首登期(从未 Ready)仍拒全部业务 proto,避免没有可重放连接语义时 silent 记账。
pub const fn is_prelogin_proto(proto_id: u32) -> bool
Trait Implementations§
Source§impl Clone for StartupReadiness
impl Clone for StartupReadiness
Source§fn clone(&self) -> StartupReadiness
fn clone(&self) -> StartupReadiness
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 StartupReadiness
impl !UnwindSafe for StartupReadiness
impl Freeze for StartupReadiness
impl Send for StartupReadiness
impl Sync for StartupReadiness
impl Unpin for StartupReadiness
impl UnsafeUnpin for StartupReadiness
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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