pub struct WsAuthInfo {
pub login_id: String,
pub token: String,
pub session_id: String,
pub connect_time: DateTime<Utc>,
pub metadata: HashMap<String, String>,
}Expand description
WebSocket authentication information WebSocket 认证信息
Contains all the information about an authenticated WebSocket connection 包含已认证的 WebSocket 连接的所有信息
Fields§
§login_id: StringUser login ID | 用户登录 ID
token: StringAuthentication token | 认证 Token
session_id: StringUnique WebSocket session ID | 唯一的 WebSocket 会话 ID Format: ws:{login_id}:{uuid}
connect_time: DateTime<Utc>Connection timestamp | 连接时间戳
metadata: HashMap<String, String>Custom metadata for this connection | 该连接的自定义元数据
Trait Implementations§
Source§impl Clone for WsAuthInfo
impl Clone for WsAuthInfo
Source§fn clone(&self) -> WsAuthInfo
fn clone(&self) -> WsAuthInfo
Returns a duplicate of the value. Read more
1.0.0§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 WsAuthInfo
impl RefUnwindSafe for WsAuthInfo
impl Send for WsAuthInfo
impl Sync for WsAuthInfo
impl Unpin for WsAuthInfo
impl UnwindSafe for WsAuthInfo
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)