Struct subxt_metadata::PalletMetadata
source · pub struct PalletMetadata<'a> { /* private fields */ }Expand description
Metadata for a specific pallet.
Implementations§
source§impl<'a> PalletMetadata<'a>
impl<'a> PalletMetadata<'a>
sourcepub fn call_ty_id(&self) -> Option<u32>
pub fn call_ty_id(&self) -> Option<u32>
Type ID for the pallet’s Call type, if it exists.
sourcepub fn event_ty_id(&self) -> Option<u32>
pub fn event_ty_id(&self) -> Option<u32>
Type ID for the pallet’s Event type, if it exists.
sourcepub fn error_ty_id(&self) -> Option<u32>
pub fn error_ty_id(&self) -> Option<u32>
Type ID for the pallet’s Error type, if it exists.
sourcepub fn storage(&self) -> Option<&'a StorageMetadata>
pub fn storage(&self) -> Option<&'a StorageMetadata>
Return metadata about the pallet’s storage entries.
sourcepub fn event_variants(&self) -> Option<&'a [Variant<PortableForm>]>
pub fn event_variants(&self) -> Option<&'a [Variant<PortableForm>]>
Return all of the event variants, if an event type exists.
sourcepub fn event_variant_by_index(
&self,
variant_index: u8
) -> Option<&'a Variant<PortableForm>>
pub fn event_variant_by_index( &self, variant_index: u8 ) -> Option<&'a Variant<PortableForm>>
Return an event variant given it’s encoded variant index.
sourcepub fn call_variants(&self) -> Option<&'a [Variant<PortableForm>]>
pub fn call_variants(&self) -> Option<&'a [Variant<PortableForm>]>
Return all of the call variants, if a call type exists.
sourcepub fn call_variant_by_index(
&self,
variant_index: u8
) -> Option<&'a Variant<PortableForm>>
pub fn call_variant_by_index( &self, variant_index: u8 ) -> Option<&'a Variant<PortableForm>>
Return a call variant given it’s encoded variant index.
sourcepub fn call_variant_by_name(
&self,
call_name: &str
) -> Option<&'a Variant<PortableForm>>
pub fn call_variant_by_name( &self, call_name: &str ) -> Option<&'a Variant<PortableForm>>
Return a call variant given it’s name.
sourcepub fn error_variants(&self) -> Option<&'a [Variant<PortableForm>]>
pub fn error_variants(&self) -> Option<&'a [Variant<PortableForm>]>
Return all of the error variants, if an error type exists.
sourcepub fn error_variant_by_index(
&self,
variant_index: u8
) -> Option<&'a Variant<PortableForm>>
pub fn error_variant_by_index( &self, variant_index: u8 ) -> Option<&'a Variant<PortableForm>>
Return an error variant given it’s encoded variant index.
sourcepub fn constant_by_name(&self, name: &str) -> Option<&'a ConstantMetadata>
pub fn constant_by_name(&self, name: &str) -> Option<&'a ConstantMetadata>
Return constant details given the constant name.
sourcepub fn constants(&self) -> impl ExactSizeIterator<Item = &'a ConstantMetadata>
pub fn constants(&self) -> impl ExactSizeIterator<Item = &'a ConstantMetadata>
An iterator over the constants in this pallet.
sourcepub fn storage_hash(&self, entry_name: &str) -> Option<[u8; 32]>
pub fn storage_hash(&self, entry_name: &str) -> Option<[u8; 32]>
Return a hash for the storage entry, or None if it was not found.
sourcepub fn constant_hash(&self, constant_name: &str) -> Option<[u8; 32]>
pub fn constant_hash(&self, constant_name: &str) -> Option<[u8; 32]>
Return a hash for the constant, or None if it was not found.
Trait Implementations§
source§impl<'a> Clone for PalletMetadata<'a>
impl<'a> Clone for PalletMetadata<'a>
source§fn clone(&self) -> PalletMetadata<'a>
fn clone(&self) -> PalletMetadata<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more