pub trait SessionStore: 'static + Send + Sync + Debug {
    type Value: Clone + DeserializeOwned + Serialize + Send + Sync;

    // Required methods
    fn key(&self) -> &Key;
    fn key_name(&self) -> &str;
    fn set<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        prefix: Option<String>,
        session_id: &'life1 Uuid,
        session: &'life2 Session<Self::Value>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<Session<Self::Value>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn into_dyn(self) -> DynSessionStore<Self::Value>
       where Self: Sized { ... }
    fn store_session_and_set_cookie<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        res: &'life1 mut Response<Body>,
        cookie_config: CookieConfig<'life2, Self::Value>,
        prefix: Option<String>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        res: &'life1 mut Response<Body>,
        cookie_config: CookieConfig<'life2, ()>,
        session_id: Option<&'life3 Uuid>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
}

Required Associated Types§

Required Methods§

source

fn key(&self) -> &Key

source

fn key_name(&self) -> &str

source

fn set<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, prefix: Option<String>, session_id: &'life1 Uuid, session: &'life2 Session<Self::Value> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 Uuid ) -> Pin<Box<dyn Future<Output = Result<Session<Self::Value>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 Uuid ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

source

fn into_dyn(self) -> DynSessionStore<Self::Value>where Self: Sized,

source

fn delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, res: &'life1 mut Response<Body>, cookie_config: CookieConfig<'life2, ()>, session_id: Option<&'life3 Uuid> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§

source§

impl<S: SessionStore + ?Sized, Wrapper: 'static + Debug + Deref<Target = S> + Send + Sync> SessionStore for Wrapper

§

type Value = <S as SessionStore>::Value

source§

impl<T, Manager, Connection, C> SessionStore for RedisStore<T, Pool<Manager, Connection>>where T: 'static + Clone + DeserializeOwned + Serialize + Send + Sync, Manager: 'static + Manager + Send + Sync, <Manager as Manager>::Type: 'static + Send + Sync, <Manager as Manager>::Error: 'static + Debug + Display + Send + Sync, Connection: 'static + From<Object<Manager>> + Send + Sync + DerefMut<Target = C>, C: ConnectionLike + Send,

§

type Value = T