//! Session for each connected user use super::*; id_type!(SessionID; "A unique session ID, not bound to a user."); #[derive(Debug)] pub struct Session { id: SessionID, user: user::User, } impl Session { /// The randomly generated ID of this session, irrespective of the user of this session. #[inline] pub fn session_id(&self) -> &SessionID { &self.id } /// The unique user ID of this session pub fn user_id(&self) -> user::UserID { self.user.id_for_session(self) } }