Struct subxt_metadata::Metadata
source · pub struct Metadata { /* private fields */ }Expand description
Node metadata. This can be constructed by providing some compatible frame_metadata
which is then decoded into this. We aim to preserve all of the existing information in
the incoming metadata while optimizing the format a little for Subxt’s use cases.
Implementations§
source§impl Metadata
impl Metadata
sourcepub fn types(&self) -> &PortableRegistry
pub fn types(&self) -> &PortableRegistry
Access the underlying type registry.
sourcepub fn types_mut(&mut self) -> &mut PortableRegistry
pub fn types_mut(&mut self) -> &mut PortableRegistry
Mutable access to the underlying type registry.
sourcepub fn runtime_ty(&self) -> u32
pub fn runtime_ty(&self) -> u32
The type ID of the Runtime type.
sourcepub fn dispatch_error_ty(&self) -> Option<u32>
pub fn dispatch_error_ty(&self) -> Option<u32>
The type ID of the DispatchError type, if it exists.
sourcepub fn extrinsic(&self) -> &ExtrinsicMetadata
pub fn extrinsic(&self) -> &ExtrinsicMetadata
Return details about the extrinsic format.
sourcepub fn outer_enums(&self) -> OuterEnumsMetadata
pub fn outer_enums(&self) -> OuterEnumsMetadata
Return details about the outer enums.
sourcepub fn pallets(&self) -> impl ExactSizeIterator<Item = PalletMetadata<'_>>
pub fn pallets(&self) -> impl ExactSizeIterator<Item = PalletMetadata<'_>>
An iterator over all of the available pallets.
sourcepub fn pallet_by_index(&self, variant_index: u8) -> Option<PalletMetadata<'_>>
pub fn pallet_by_index(&self, variant_index: u8) -> Option<PalletMetadata<'_>>
Access a pallet given its encoded variant index.
sourcepub fn pallet_by_name(&self, pallet_name: &str) -> Option<PalletMetadata<'_>>
pub fn pallet_by_name(&self, pallet_name: &str) -> Option<PalletMetadata<'_>>
Access a pallet given its name.
sourcepub fn runtime_api_traits(
&self
) -> impl ExactSizeIterator<Item = RuntimeApiMetadata<'_>>
pub fn runtime_api_traits( &self ) -> impl ExactSizeIterator<Item = RuntimeApiMetadata<'_>>
An iterator over all of the runtime APIs.
sourcepub fn runtime_api_trait_by_name(
&self,
name: &str
) -> Option<RuntimeApiMetadata<'_>>
pub fn runtime_api_trait_by_name( &self, name: &str ) -> Option<RuntimeApiMetadata<'_>>
Access a runtime API trait given its name.
sourcepub fn custom(&self) -> CustomMetadata<'_>
pub fn custom(&self) -> CustomMetadata<'_>
Returns custom user defined types
sourcepub fn hasher(&self) -> MetadataHasher<'_>
pub fn hasher(&self) -> MetadataHasher<'_>
Obtain a unique hash representing this metadata or specific parts of it.