[−][src]Trait sessions::Storage
A Storage Trait
Required methods
#[must_use]pub fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<Map<String, Value>>, Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<Map<String, Value>>, Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get a data from storage by the key
#[must_use]pub fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
val: Map<String, Value>,
exp: Duration
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str,
val: Map<String, Value>,
exp: Duration
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Set a session to storage
#[must_use]pub fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Remove a data from storage by the key
Provided methods
#[must_use]pub fn reset<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Reset the storage and remove all keys
#[must_use]pub fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Close the connection
Implementors
impl Storage for Config
[src]
pub fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<Map<String, Value>>, Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Config: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<Map<String, Value>>, Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Config: 'async_trait,
Get a data from storage by the key
pub fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
val: Map<String, Value>,
exp: Duration
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Config: 'async_trait,
[src]
&'life0 self,
key: &'life1 str,
val: Map<String, Value>,
exp: Duration
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Config: 'async_trait,
Set a data to storage by the key
pub fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Config: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Config: 'async_trait,
Remove a data from storage by the key
pub fn reset<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Config: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Config: 'async_trait,
Reset the storage and remove all keys
pub fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Config: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Config: 'async_trait,
Close the connection