pub struct DatabaseSessionStore { /* private fields */ }Implementations
sourceimpl DatabaseSessionStore
impl DatabaseSessionStore
sourcepub fn new(connection: DatabaseConnection) -> DatabaseSessionStore
pub fn new(connection: DatabaseConnection) -> DatabaseSessionStore
Create a new DatabaseSessionStore from the given DatabaseConnection.
Example
use async_sea_orm_session::DatabaseSessionStore;
use sea_orm::{Database, DatabaseConnection};
let db: DatabaseConnection =
Database::connect("protocol://username:password@host/database").await?;
// Make a `DatabaseSessionStore` which reuses the underlying connection pool:
let store = DatabaseSessionStore::new(db.clone());
// Alternatively if you don't mind moving `db` you can do:
let store = DatabaseSessionStore::new(db);Trait Implementations
sourceimpl Clone for DatabaseSessionStore
impl Clone for DatabaseSessionStore
sourcefn clone(&self) -> DatabaseSessionStore
fn clone(&self) -> DatabaseSessionStore
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for DatabaseSessionStore
impl Debug for DatabaseSessionStore
sourceimpl SessionStore for DatabaseSessionStore
impl SessionStore for DatabaseSessionStore
sourcefn load_session<'life0, 'async_trait>(
&'life0 self,
cookie_value: String
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn load_session<'life0, 'async_trait>(
&'life0 self,
cookie_value: String
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get a session from the storage backend. Read more
sourcefn store_session<'life0, 'async_trait>(
&'life0 self,
session: Session
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn store_session<'life0, 'async_trait>(
&'life0 self,
session: Session
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Store a session on the storage backend. Read more
Auto Trait Implementations
impl RefUnwindSafe for DatabaseSessionStore
impl Send for DatabaseSessionStore
impl Sync for DatabaseSessionStore
impl Unpin for DatabaseSessionStore
impl UnwindSafe for DatabaseSessionStore
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more