[][src]Struct carapax_session::SessionCollector

pub struct SessionCollector<B> { /* fields omitted */ }

Garbage collector for sessions

Methods

impl<B> SessionCollector<B> where
    B: SessionBackend
[src]

pub fn new(
    backend: B,
    period: Duration,
    lifetime: Duration
) -> SessionCollector<B>
[src]

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.