referrerpolicy=no-referrer-when-downgrade

Trait polkadot_service::ProvideRuntimeApi

source ·
pub trait ProvideRuntimeApi<Block>
where Block: Block,
{ type Api: ApiExt<Block>; // Required method fn runtime_api(&self) -> ApiRef<'_, Self::Api>; }
Expand description

Something that provides a runtime api.

Required Associated Types§

source

type Api: ApiExt<Block>

The concrete type that provides the api.

Required Methods§

source

fn runtime_api(&self) -> ApiRef<'_, Self::Api>

Returns the runtime api. The returned instance will keep track of modifications to the storage. Any successful call to an api function, will commit its changes to an internal buffer. Otherwise, the modifications will be discarded. The modifications will not be applied to the storage, even on a commit.

Implementations on Foreign Types§

source§

impl<B, E, Block, RA> ProvideRuntimeApi<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block, Backend = B> + Send + Sync, Block: Block, RA: ConstructRuntimeApi<Block, Client<B, E, Block, RA>> + Send + Sync,

§

type Api = <RA as ConstructRuntimeApi<Block, Client<B, E, Block, RA>>>::RuntimeApi

source§

fn runtime_api( &self, ) -> ApiRef<'_, <Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api>

Implementors§