pub struct DatabaseSessionStore { /* private fields */ }Implementations§
Source§impl 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§
Source§impl Clone for DatabaseSessionStore
impl Clone for DatabaseSessionStore
Source§fn clone(&self) -> DatabaseSessionStore
fn clone(&self) -> DatabaseSessionStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseSessionStore
impl Debug for DatabaseSessionStore
Source§impl SessionStore for DatabaseSessionStore
impl SessionStore for DatabaseSessionStore
Source§fn load_session<'life0, 'async_trait>(
&'life0 self,
cookie_value: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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
Self: 'async_trait,
'life0: 'async_trait,
Get a session from the storage backend. Read more
Source§fn store_session<'life0, 'async_trait>(
&'life0 self,
session: Session,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_session<'life0, 'async_trait>(
&'life0 self,
session: Session,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store a session on the storage backend. Read more
Auto Trait Implementations§
impl Freeze for DatabaseSessionStore
impl RefUnwindSafe for DatabaseSessionStore
impl Send for DatabaseSessionStore
impl Sync for DatabaseSessionStore
impl Unpin for DatabaseSessionStore
impl UnwindSafe for DatabaseSessionStore
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