Trait orml_oracle_rpc::OracleApi[][src]

pub trait OracleApi<BlockHash, ProviderId, Key, Value>: Sized + Send + Sync + 'static {
    fn get_value(
        &self,
        provider_id: ProviderId,
        key: Key,
        at: Option<BlockHash>
    ) -> Result<Option<Value>>;
fn get_all_values(
        &self,
        provider_id: ProviderId,
        at: Option<BlockHash>
    ) -> Result<Vec<(Key, Option<Value>)>>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
    where
        BlockHash: Send + Sync + 'static + DeserializeOwned,
        ProviderId: Send + Sync + 'static + DeserializeOwned,
        Key: Send + Sync + 'static + Serialize + DeserializeOwned,
        Value: Send + Sync + 'static + Serialize
, { ... } }

Required methods

fn get_value(
    &self,
    provider_id: ProviderId,
    key: Key,
    at: Option<BlockHash>
) -> Result<Option<Value>>
[src]

fn get_all_values(
    &self,
    provider_id: ProviderId,
    at: Option<BlockHash>
) -> Result<Vec<(Key, Option<Value>)>>
[src]

Loading content...

Provided methods

fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> where
    BlockHash: Send + Sync + 'static + DeserializeOwned,
    ProviderId: Send + Sync + 'static + DeserializeOwned,
    Key: Send + Sync + 'static + Serialize + DeserializeOwned,
    Value: Send + Sync + 'static + Serialize
[src]

Create an IoDelegate, wiring rpc calls to the trait methods.

Loading content...

Implementors

impl<C, Block, ProviderId, Key, Value> OracleApi<<Block as Block>::Hash, ProviderId, Key, Value> for Oracle<C, Block> where
    Block: BlockT,
    C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
    C::Api: OracleRuntimeApi<Block, ProviderId, Key, Value>,
    ProviderId: Codec,
    Key: Codec,
    Value: Codec
[src]

Loading content...