pub struct SessionManager { /* private fields */ }Expand description
Manages active browser sessions.
Implementations§
Source§impl SessionManager
impl SessionManager
Sourcepub async fn create(&self, context: Box<dyn RenderContext>) -> String
pub async fn create(&self, context: Box<dyn RenderContext>) -> String
Create a new session with a browser context.
Sourcepub async fn get_mut<F, R>(&self, session_id: &str, f: F) -> Result<R>
pub async fn get_mut<F, R>(&self, session_id: &str, f: F) -> Result<R>
Get a mutable reference to a session.
Sourcepub async fn cleanup_expired(&self)
pub async fn cleanup_expired(&self)
Remove all expired sessions.
Sourcepub async fn active_count(&self) -> usize
pub async fn active_count(&self) -> usize
Number of active sessions.
Auto Trait Implementations§
impl Freeze for SessionManager
impl !RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl !UnwindSafe for SessionManager
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