Skip to main content

StateOperatorBackend

Trait StateOperatorBackend 

Source
pub trait StateOperatorBackend<V>:
    Debug
    + Sync
    + Send
where 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§

Source

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,

Source

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,

Source

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,

Source

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".

Implementors§