Trait frame::runtime::apis::Metadata

pub trait Metadata<Block>: Core<Block>where
    Block: Block,{
    // Provided methods
    fn metadata(
        &self,
        __runtime_api_at_param__: <Block as Block>::Hash
    ) -> Result<OpaqueMetadata, ApiError> { ... }
    fn metadata_at_version(
        &self,
        __runtime_api_at_param__: <Block as Block>::Hash,
        version: u32
    ) -> Result<Option<OpaqueMetadata>, ApiError> { ... }
    fn metadata_versions(
        &self,
        __runtime_api_at_param__: <Block as Block>::Hash
    ) -> Result<Vec<u32, Global>, ApiError> { ... }
}
Expand description

The Metadata api trait that returns metadata for the runtime.

Provided Methods§

fn metadata( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<OpaqueMetadata, ApiError>

Returns the metadata of a runtime.

fn metadata_at_version( &self, __runtime_api_at_param__: <Block as Block>::Hash, version: u32 ) -> Result<Option<OpaqueMetadata>, ApiError>

Returns the metadata at a given version.

If the given version isn’t supported, this will return None. Use Self::metadata_versions to find out about supported metadata version of the runtime.

fn metadata_versions( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<Vec<u32, Global>, ApiError>

Returns the supported metadata versions.

This can be used to call metadata_at_version.

Trait Implementations§

§

impl<Block> RuntimeApiInfo for dyn Metadata<Block>where Block: Block,

§

const ID: [u8; 8] = [55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8]

The identifier of the runtime api.
§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§