Address

Trait Address 

Source
pub trait Address {
    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§

Source

type Target: DecodeWithMetadata

The target type of the value that lives at this address.

Required Methods§

Source

fn pallet_name(&self) -> &str

The name of the pallet that the constant lives under.

Source

fn constant_name(&self) -> &str

The name of the constant in a given pallet.

Provided Methods§

Source

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.

Implementors§

Source§

impl<ReturnTy: DecodeWithMetadata> Address for DefaultAddress<ReturnTy>

Source§

type Target = ReturnTy