pub struct DistributedSession {
pub session_id: String,
pub login_id: String,
pub token: String,
pub service_id: String,
pub create_time: DateTime<Utc>,
pub last_access: DateTime<Utc>,
pub attributes: HashMap<String, String>,
}Expand description
Distributed session data structure 分布式 Session 数据结构
Represents a session that can be shared across multiple services 表示可以在多个服务之间共享的 Session
Fields§
§session_id: StringUnique session identifier | 唯一 Session 标识符
login_id: StringUser login ID | 用户登录 ID
token: StringAuthentication token | 认证 Token
service_id: StringID of the service that created this session | 创建此 Session 的服务 ID
create_time: DateTime<Utc>Session creation time | Session 创建时间
last_access: DateTime<Utc>Last access time | 最后访问时间
attributes: HashMap<String, String>Session attributes (key-value pairs) | Session 属性(键值对)
Trait Implementations§
Source§impl Clone for DistributedSession
impl Clone for DistributedSession
Source§fn clone(&self) -> DistributedSession
fn clone(&self) -> DistributedSession
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 moreSource§impl Debug for DistributedSession
impl Debug for DistributedSession
Source§impl<'de> Deserialize<'de> for DistributedSession
impl<'de> Deserialize<'de> for DistributedSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DistributedSession
impl RefUnwindSafe for DistributedSession
impl Send for DistributedSession
impl Sync for DistributedSession
impl Unpin for DistributedSession
impl UnwindSafe for DistributedSession
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)