StorageTypeInfo

Trait StorageTypeInfo 

Source
pub trait StorageTypeInfo {
    type TypeId: Clone;

    // Required methods
    fn storage_info(
        &self,
        pallet_name: &str,
        storage_entry: &str,
    ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>;
    fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>;

    // Provided method
    fn storage_entries_in_pallet(
        &self,
        pallet_name: &str,
    ) -> impl Iterator<Item = Cow<'_, str>> { ... }
}
Expand description

This is implemented for all metadatas exposed from frame_metadata and is responsible for extracting the type IDs and related info needed to decode storage entries.

Required Associated Types§

Source

type TypeId: Clone

The type of type IDs that we are using to obtain type information.

Required Methods§

Source

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Get the information needed to decode a specific storage entry key/value.

Source

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Iterate over all of the available storage entries.

Provided Methods§

Source

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Iterate over all of the available storage entries in a given pallet.

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.

Implementations on Foreign Types§

Source§

impl StorageTypeInfo for RuntimeMetadataV8

Source§

type TypeId = LookupName

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV9

Source§

type TypeId = LookupName

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV10

Source§

type TypeId = LookupName

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV11

Source§

type TypeId = LookupName

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV12

Source§

type TypeId = LookupName

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV13

Source§

type TypeId = LookupName

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV14

Source§

type TypeId = u32

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV15

Source§

type TypeId = u32

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Source§

impl StorageTypeInfo for RuntimeMetadataV16

Source§

type TypeId = u32

Source§

fn storage_info( &self, pallet_name: &str, storage_entry: &str, ) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>

Source§

fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>

Source§

fn storage_entries_in_pallet( &self, pallet_name: &str, ) -> impl Iterator<Item = Cow<'_, str>>

Implementors§