Trait DataProvider

Source
pub trait DataProvider<Key, Value> {
    // Required method
    fn get(key: &Key) -> Option<Value>;
}
Expand description

A simple trait to provide data

Required Methods§

Source

fn get(key: &Key) -> Option<Value>

Get data by 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<T: Config<I>, I: 'static> DataProvider<<T as Config<I>>::OracleKey, <T as Config<I>>::OracleValue> for Pallet<T, I>