Struct poem::session::MemoryStorage
source · pub struct MemoryStorage { /* private fields */ }
Available on crate feature
session
only.Expand description
A session storage using memory.
Implementations
sourceimpl MemoryStorage
impl MemoryStorage
Trait Implementations
sourceimpl Default for MemoryStorage
impl Default for MemoryStorage
sourceimpl SessionStorage for MemoryStorage
impl SessionStorage for MemoryStorage
sourcefn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Load session entries.
sourcefn update_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
entries: &'life2 BTreeMap<String, Value>,
expires: Option<Duration>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn update_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
entries: &'life2 BTreeMap<String, Value>,
expires: Option<Duration>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Insert or update a session.
Auto Trait Implementations
impl !RefUnwindSafe for MemoryStorage
impl Send for MemoryStorage
impl Sync for MemoryStorage
impl Unpin for MemoryStorage
impl !UnwindSafe for MemoryStorage
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