[−][src]Struct carapax_session::SessionCollector
Garbage collector for sessions
Methods
impl<B> SessionCollector<B> where
B: SessionBackend,
[src]
B: SessionBackend,
pub fn new(
backend: B,
period: Duration,
lifetime: Duration
) -> SessionCollector<B>
[src]
backend: B,
period: Duration,
lifetime: Duration
) -> SessionCollector<B>
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
pub fn get_handle(&self) -> SessionCollectorHandle
[src]
Returns a session collector handle
pub async fn run(&'_ mut self)
[src]
Starts GC loop
Auto Trait Implementations
impl<B> !RefUnwindSafe for SessionCollector<B>
impl<B> Send for SessionCollector<B> where
B: Send,
B: Send,
impl<B> Sync for SessionCollector<B> where
B: Sync,
B: Sync,
impl<B> Unpin for SessionCollector<B> where
B: Unpin,
B: Unpin,
impl<B> !UnwindSafe for SessionCollector<B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,