SessionDataValueStorage

Trait SessionDataValueStorage 

Source
pub trait SessionDataValueStorage<K, V>
where K: Hash + Eq,
{ // Required methods fn set_value<'life0, 'async_trait, KVal, VVal>( &'life0 self, key: KVal, val: VVal, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where KVal: Into<K> + Send + 'async_trait, VVal: Into<V> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn unset_value<'life0, 'async_trait, KVal>( &'life0 self, key: KVal, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where KVal: Into<K> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn get_value<'life0, 'life1, 'async_trait, KRef>( &'life0 self, key: &'life1 KRef, ) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>> where KRef: Hash + Eq + ?Sized + ToOwned<Owned = K> + Sync + 'async_trait, K: Borrow<KRef> + Hash + Eq, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; }

Required Methods§

Source

fn set_value<'life0, 'async_trait, KVal, VVal>( &'life0 self, key: KVal, val: VVal, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where KVal: Into<K> + Send + 'async_trait, VVal: Into<V> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn unset_value<'life0, 'async_trait, KVal>( &'life0 self, key: KVal, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where KVal: Into<K> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_value<'life0, 'life1, 'async_trait, KRef>( &'life0 self, key: &'life1 KRef, ) -> Pin<Box<dyn Future<Output = Result<Option<V>>> + Send + 'async_trait>>
where KRef: Hash + Eq + ?Sized + ToOwned<Owned = K> + Sync + 'async_trait, K: Borrow<KRef> + Hash + Eq, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<K, V> SessionDataValueStorage<K, V> for InMemorySessionData<K, V>
where K: Clone + Hash + Eq + Send, V: Clone + Send,