Skip to main content

KeyedState

Trait KeyedState 

Source
pub trait KeyedState: Send + Sync {
    // Required methods
    fn key(&self) -> &[u8] ;
    fn clear(&self) -> impl Future<Output = Result<()>> + Send;
}
Expand description

Keyed state trait.

Required Methods§

Source

fn key(&self) -> &[u8]

Get the state key.

Source

fn clear(&self) -> impl Future<Output = Result<()>> + Send

Clear the state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B, F> KeyedState for AggregatingState<B, F>
where B: StateBackend, F: Fn(Vec<u8>, Vec<u8>) -> Vec<u8> + Send + Sync,

Source§

impl<B, F> KeyedState for ReducingState<B, F>
where B: StateBackend, F: Fn(Vec<u8>, Vec<u8>) -> Vec<u8> + Send + Sync,

Source§

impl<B> KeyedState for ListState<B>
where B: StateBackend,

Source§

impl<B> KeyedState for MapState<B>
where B: StateBackend,

Source§

impl<B> KeyedState for ValueState<B>
where B: StateBackend,