pub trait StateOperatorBackend<V>:
Debug
+ Sync
+ Sendwhere
V: Serialize + for<'de> Deserialize<'de>,{
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
key: StateKey,
) -> Pin<Box<dyn Future<Output = Result<Option<V>, StateBackendError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
key: StateKey,
value: V,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn remove<'life0, 'async_trait>(
&'life0 self,
key: StateKey,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Required Methods§
fn get<'life0, 'async_trait>(
&'life0 self,
key: StateKey,
) -> Pin<Box<dyn Future<Output = Result<Option<V>, StateBackendError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
key: StateKey,
value: V,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn remove<'life0, 'async_trait>(
&'life0 self,
key: StateKey,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".