Trait subxt::constants::ConstantAddress
source · pub trait ConstantAddress {
type Target: DecodeWithMetadata;
// Required methods
fn pallet_name(&self) -> &str;
fn constant_name(&self) -> &str;
// Provided method
fn validation_hash(&self) -> Option<[u8; 32]> { ... }
}
Expand description
This represents a constant address. Anything implementing this trait can be used to fetch constants.
Required Associated Types§
sourcetype Target: DecodeWithMetadata
type Target: DecodeWithMetadata
The target type of the value that lives at this address.
Required Methods§
sourcefn pallet_name(&self) -> &str
fn pallet_name(&self) -> &str
The name of the pallet that the constant lives under.
sourcefn constant_name(&self) -> &str
fn constant_name(&self) -> &str
The name of the constant in a given pallet.
Provided Methods§
sourcefn validation_hash(&self) -> Option<[u8; 32]>
fn validation_hash(&self) -> Option<[u8; 32]>
An optional hash which, if present, will be checked against the node metadata to confirm that the return type matches what we are expecting.