pub struct LoginResult {
pub user_id: u64,
pub session_key: Vec<u8>,
pub session_key_update_interval: u32,
pub web_url_head: Option<String>,
pub keep_alive_interval: u32,
pub sec_data: Option<u32>,
pub server_time_update: Option<ServerTimeAnchorUpdate>,
pub client_ip: String,
pub update_flag: Option<u32>,
pub web_session_id: Option<u64>,
pub ignored_field_presence: TcpLoginIgnoredResponseFieldPresence,
}Expand description
登录结果
Fields§
§user_id: u64§session_key: Vec<u8>RspEncryptData.session_key 原始字节 —— 长度由服务端决定,对齐 C++
Logger::session_key_ 是 std::string(logger.h:152)变长存储。
Platform 通常 16 字节,Broker 可能 32 字节,不能强制截断。
session_key_update_interval: u32Effective C++ StartSessionKeyTimer interval. Missing or zero field 6
is normalized to 180 seconds by the auth domain.
web_url_head: Option<String>Optional channel metadata fields consumed by C++ login success.
keep_alive_interval: u32§sec_data: Option<u32>§server_time_update: Option<ServerTimeAnchorUpdate>Complete Platform login server-time sample captured at network receive.
Broker callers deliberately ignore this update; only Platform owns the
process-wide server clock, matching FTLogin logger.cpp:558-568.
client_ip: StringRspEncryptData.client_ip(field 14), server 视角的客户端外网 IP。
Ref: FTLogin FTConnLogin.proto:105 + logger.cpp:511-516。
C++ 会把它保存到 working_tcp_client->client_ip,并在 broker CMD20147
ConnIpReq.client_feature.client_ip 中回填;broker 1007 会严格校验。
update_flag: Option<u32>§web_session_id: Option<u64>§ignored_field_presence: TcpLoginIgnoredResponseFieldPresenceRedaction-safe ownership markers for fields 2/3/5, whose values C++ normal-login success does not consume.
Trait Implementations§
Source§impl Clone for LoginResult
impl Clone for LoginResult
Source§fn clone(&self) -> LoginResult
fn clone(&self) -> LoginResult
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 Freeze for LoginResult
impl RefUnwindSafe for LoginResult
impl Send for LoginResult
impl Sync for LoginResult
impl Unpin for LoginResult
impl UnsafeUnpin for LoginResult
impl UnwindSafe for LoginResult
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