Struct seance::SessionCollector
source · pub struct SessionCollector<B> { /* private fields */ }
Expand description
Garbage collector for sessions
Implementations§
source§impl<B> SessionCollector<B>where
B: SessionBackend,
impl<B> SessionCollector<B>where
B: SessionBackend,
sourcepub fn new(backend: B, period: Duration, lifetime: Duration) -> Self
pub fn new(backend: B, period: Duration, lifetime: Duration) -> Self
Creates a new collector
GC allows to remove all sessions with age longer than given lifetime
§Arguments
- backend - Store backend
- period - Interval between GC calls
- lifetime - Minimum session lifetime
sourcepub fn get_handle(&self) -> SessionCollectorHandle
pub fn get_handle(&self) -> SessionCollectorHandle
Returns a session collector handle
Auto Trait Implementations§
impl<B> Freeze for SessionCollector<B>where
B: Freeze,
impl<B> !RefUnwindSafe for SessionCollector<B>
impl<B> Send for SessionCollector<B>where
B: Send,
impl<B> Sync for SessionCollector<B>where
B: Sync,
impl<B> Unpin for SessionCollector<B>where
B: Unpin,
impl<B> !UnwindSafe for SessionCollector<B>
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