Trait MetadataApi

Source
pub trait MetadataApi: RuntimeApi {
    type OpaqueMetadata;

    // Required methods
    fn metadata<'life0, 'async_trait>(
        &'life0 self,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Metadata>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn opaque_metadata<'life0, 'async_trait>(
        &'life0 self,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Self::OpaqueMetadata>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn metadata_at_version<'life0, 'async_trait>(
        &'life0 self,
        version: u32,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Metadata>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn opaque_metadata_at_version<'life0, 'async_trait>(
        &'life0 self,
        version: u32,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::OpaqueMetadata>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn metadata_versions<'life0, 'async_trait>(
        &'life0 self,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u32>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_traits<'life0, 'async_trait>(
        &'life0 self,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_methods_of_trait<'life0, 'life1, 'async_trait>(
        &'life0 self,
        trait_name: &'life1 str,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn metadata<'life0, 'async_trait>( &'life0 self, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Metadata>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the metadata of a runtime.

Source

fn opaque_metadata<'life0, 'async_trait>( &'life0 self, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Self::OpaqueMetadata>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the opaque metadata of a runtime.

Source

fn metadata_at_version<'life0, 'async_trait>( &'life0 self, version: u32, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Option<Metadata>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the metadata at a given version.

Source

fn opaque_metadata_at_version<'life0, 'async_trait>( &'life0 self, version: u32, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::OpaqueMetadata>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the opaque metadata at a given version.

Source

fn metadata_versions<'life0, 'async_trait>( &'life0 self, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u32>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the supported metadata versions.

Source

fn list_traits<'life0, 'async_trait>( &'life0 self, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_methods_of_trait<'life0, 'life1, 'async_trait>( &'life0 self, trait_name: &'life1 str, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§

Source§

impl<T, Client> MetadataApi for RuntimeApiClient<T, Client>
where T: Config, Client: Request,