pub trait Config: Config {
type BlockProducerId: Member + Parameter + MaxEncodedLen;
type Moment: Member + Parameter + MaxEncodedLen + PartialOrd + Ord + PartialEq + Eq;
type GetAuthor: GetAuthor<Self::BlockProducerId>;
type GetMoment: GetMoment<Self::Moment>;
}Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
Sourcetype BlockProducerId: Member + Parameter + MaxEncodedLen
type BlockProducerId: Member + Parameter + MaxEncodedLen
ID type that can represent any block producer in the network. This type should be defined by the Partner Chain Depending on its consensus mechanism and possible block producer types.
Sourcetype Moment: Member + Parameter + MaxEncodedLen + PartialOrd + Ord + PartialEq + Eq
type Moment: Member + Parameter + MaxEncodedLen + PartialOrd + Ord + PartialEq + Eq
Type used to identify the moment in time when the block was produced, eg. a timestamp or slot number.
Sourcetype GetAuthor: GetAuthor<Self::BlockProducerId>
type GetAuthor: GetAuthor<Self::BlockProducerId>
Source of current block’s author
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.