pub struct SessionRegistry {
pub sessions: RwLock<HashMap<String, Session>>,
/* private fields */
}Fields§
§sessions: RwLock<HashMap<String, Session>>Implementations§
Source§impl SessionRegistry
impl SessionRegistry
pub fn new() -> Self
pub fn with_persistence<P: AsRef<Path>>(dir: P) -> Result<Self>
pub async fn persist_snapshot(&self) -> Result<()>
pub async fn get_session(&self, session_id: &str) -> Option<Session>
pub async fn get_all_sessions(&self) -> Vec<Session>
pub async fn insert_recovered_session( &self, session_id: String, session: Session, )
pub async fn count_open_sessions_for_initiator(&self, sender: &str) -> usize
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SessionRegistry
impl !RefUnwindSafe for SessionRegistry
impl !UnwindSafe for SessionRegistry
impl Send for SessionRegistry
impl Sync for SessionRegistry
impl Unpin for SessionRegistry
impl UnsafeUnpin for SessionRegistry
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