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§
Required Methods§
Sourcefn storage_info(
&self,
pallet_name: &str,
storage_entry: &str,
) -> Result<StorageInfo<'_, Self::TypeId>, StorageInfoError<'_>>
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.
Sourcefn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>
fn storage_entries(&self) -> impl Iterator<Item = Entry<'_>>
Iterate over all of the available storage entries.
Provided Methods§
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.