1 2 3 4 5 6 7 8 9 10 11 12
//! Session statistics.
/// Session id
pub type SessionId = u64;
/// Keeps track of open sessions
pub trait SessionStats: Send + Sync + 'static {
/// Executed when new session is opened.
fn open_session(&self, id: SessionId);
/// Executed when session is closed.
fn close_session(&self, id: SessionId);
}