orml_oracle_runtime_api/
lib.rs

1//! Runtime API definition for oracle module.
2
3#![cfg_attr(not(feature = "std"), no_std)]
4// The `too_many_arguments` warning originates from `decl_runtime_apis` macro.
5#![allow(clippy::too_many_arguments)]
6// The `unnecessary_mut_passed` warning originates from `decl_runtime_apis` macro.
7#![allow(clippy::unnecessary_mut_passed)]
8
9use parity_scale_codec::Codec;
10use sp_std::prelude::Vec;
11
12sp_api::decl_runtime_apis! {
13	pub trait OracleApi<ProviderId, Key, Value> where
14		ProviderId: Codec,
15		Key: Codec,
16		Value: Codec,
17	{
18		fn get_value(provider_id: ProviderId, key: Key) -> Option<Value>;
19		fn get_all_values(provider_id: ProviderId) -> Vec<(Key, Option<Value>)>;
20	}
21}