pub trait Address {
type Target: DecodeWithMetadata;
type IsDecodable;
// Required method
fn name(&self) -> &str;
// Provided method
fn validation_hash(&self) -> Option<[u8; 32]> { ... }
}Expand description
This represents the address of a custom value in the metadata.
Anything that implements it can be used to fetch custom values from the metadata.
The trait is implemented by str for dynamic lookup and StaticAddress for static queries.
Required Associated Types§
Sourcetype Target: DecodeWithMetadata
type Target: DecodeWithMetadata
The type of the custom value.
Sourcetype IsDecodable
type IsDecodable
Should be set to Yes for Dynamic values and static values that have a valid type.
Should be () for custom values, that have an invalid type id.
Required Methods§
Provided Methods§
Sourcefn validation_hash(&self) -> Option<[u8; 32]>
fn validation_hash(&self) -> Option<[u8; 32]>
An optional hash which, if present, can be checked against node metadata.