sp_api

Trait ConstructRuntimeApi

Source
pub trait ConstructRuntimeApi<Block: BlockT, C: CallApiAt<Block>> {
    type RuntimeApi: ApiExt<Block>;

    // Required method
    fn construct_runtime_api(call: &C) -> ApiRef<'_, Self::RuntimeApi>;
}
Expand description

Something that can be constructed to a runtime api.

Required Associated Types§

Source

type RuntimeApi: ApiExt<Block>

The actual runtime api that will be constructed.

Required Methods§

Source

fn construct_runtime_api(call: &C) -> ApiRef<'_, Self::RuntimeApi>

Construct an instance of the runtime api.

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§