pub(super) struct ClientSession {
pub _user_name: String,
pub _user_role: UserRole,
pub active_connection: Option<(Sender<TcpServerMessage>, u64)>,
pub subscriptions: Vec<(SubscribeTopic, UpdateMode)>,
}Expand description
Represents an authenticated user session within the server.
A session persists even if the physical connection drops, allowing clients to seamlessly reconnect and resume their subscriptions and privileges without logging in again.
Fields§
§_user_name: StringThe display name of the authenticated user.
_user_role: UserRoleThe permission level and operational scope assigned to this user.
active_connection: Option<(Sender<TcpServerMessage>, u64)>The active communication channel to the client, if currently connected.
Stores the mpsc::Sender for dispatching network messages and the physical ConnectionID.
subscriptions: Vec<(SubscribeTopic, UpdateMode)>A list of engine state topics this session is currently subscribed to.
Auto Trait Implementations§
impl Freeze for ClientSession
impl RefUnwindSafe for ClientSession
impl Send for ClientSession
impl Sync for ClientSession
impl Unpin for ClientSession
impl UnsafeUnpin for ClientSession
impl UnwindSafe for ClientSession
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