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§
Required Methods§
sourcefn runtime_api(&self) -> ApiRef<'_, Self::Api>
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
.