Store

Trait Store 

Source
pub trait Store {
    type Key;
    type Value;
    type Error;

    // Required method
    fn get(
        &self,
        key: &Self::Key,
    ) -> impl Future<Output = Result<Option<Self::Value>, Self::Error>>;
}
Expand description

A read-only key-value store.

Required Associated Types§

Required Methods§

Source

fn get( &self, key: &Self::Key, ) -> impl Future<Output = Result<Option<Self::Value>, Self::Error>>

Get the value of a key.

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<A> Store for AnyExt<A>
where A: CleanAny,

Source§

impl<E, K, V, T> Store for Store<E, K, V, T>
where E: Storage + Clock + Metrics, K: Array, V: VariableValue, T: Translator,

Source§

impl<E: RStorage + Clock + Metrics, K: Array, V: FixedValue, H: Hasher, T: Translator, const N: usize, S: State<DigestOf<H>>> Store for commonware_storage::qmdb::current::ordered::fixed::Db<E, K, V, H, T, N, S>

Source§

impl<E: RStorage + Clock + Metrics, K: Array, V: FixedValue, H: Hasher, T: Translator, const N: usize, S: State<DigestOf<H>>> Store for commonware_storage::qmdb::current::unordered::fixed::Db<E, K, V, H, T, N, S>

Source§

impl<E: RStorage + Clock + Metrics, K: Array, V: VariableValue, H: CHasher, T: Translator> Store for Immutable<E, K, V, H, T, Clean<H::Digest>>

Source§

impl<E: Storage + Metrics + Clock, K: Array, V: Codec> Store for Freezer<E, K, V>

Source§

impl<E: Storage + Metrics + Clock, V: CodecFixed<Cfg = ()>> Store for Ordinal<E, V>

Source§

impl<E: Storage + Metrics, V: Codec> Store for Cache<E, V>