pub struct LoginState {
pub user_id: u32,
pub is_logged_in: bool,
pub login_account: String,
pub region: String,
pub user_attribution: Option<i32>,
pub server_addr: String,
}Expand description
登录状态
Fields§
§user_id: u32登录后服务端分配的 user_id
is_logged_in: bool是否处于已登录状态
login_account: String登录账号(归一化后,不含区号前缀)
region: String归属地区标识
user_attribution: Option<i32>用户注册归属地,数值对齐 Common.UserAttribution / GetUserInfo.userAttribution。
server_addr: String已建立连接的服务端地址
Trait Implementations§
Source§impl Clone for LoginState
impl Clone for LoginState
Source§fn clone(&self) -> LoginState
fn clone(&self) -> LoginState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LoginState
impl RefUnwindSafe for LoginState
impl Send for LoginState
impl Sync for LoginState
impl Unpin for LoginState
impl UnsafeUnpin for LoginState
impl UnwindSafe for LoginState
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
Mutably borrows from an owned value. Read more
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>
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 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>
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