pub trait Metadata<Block: BlockT>: Core<Block> {
// Provided methods
fn metadata(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<OpaqueMetadata, ApiError> { ... }
fn metadata_at_version(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
version: u32
) -> Result<Option<OpaqueMetadata>, ApiError> { ... }
fn metadata_versions(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Vec<u32>, ApiError> { ... }
}
Expand description
The Metadata
api trait that returns metadata for the runtime.
Provided Methods§
sourcefn metadata(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<OpaqueMetadata, ApiError>
fn metadata( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<OpaqueMetadata, ApiError>
Returns the metadata of a runtime.
sourcefn metadata_at_version(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
version: u32
) -> Result<Option<OpaqueMetadata>, ApiError>
fn metadata_at_version( &self, __runtime_api_at_param__: <Block as BlockT>::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.