Trait subxt::storage::address::StorageAddress
source · pub trait StorageAddress {
type Target: DecodeWithMetadata;
type IsFetchable;
type IsDefaultable;
type IsIterable;
// Required methods
fn pallet_name(&self) -> &str;
fn entry_name(&self) -> &str;
fn append_entry_bytes(
&self,
metadata: &Metadata,
bytes: &mut Vec<u8>
) -> Result<(), Error>;
// Provided method
fn validation_hash(&self) -> Option<[u8; 32]> { ... }
}
Expand description
This represents a storage address. Anything implementing this trait can be used to fetch and iterate over storage entries.
Required Associated Types§
sourcetype Target: DecodeWithMetadata
type Target: DecodeWithMetadata
The target type of the value that lives at this address.
sourcetype IsFetchable
type IsFetchable
Can an entry be fetched from this address?
Set this type to Yes
to enable the corresponding calls to be made.
sourcetype IsDefaultable
type IsDefaultable
Can a default entry be obtained from this address?
Set this type to Yes
to enable the corresponding calls to be made.
sourcetype IsIterable
type IsIterable
Can this address be iterated over?
Set this type to Yes
to enable the corresponding calls to be made.
Required Methods§
sourcefn pallet_name(&self) -> &str
fn pallet_name(&self) -> &str
The name of the pallet that the entry lives under.
sourcefn entry_name(&self) -> &str
fn entry_name(&self) -> &str
The name of the entry in a given pallet that the item is at.
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.