pub trait OnInitializeWithWeightRegistration<T: Config> {
// Required method
fn on_initialize_with_weight_registration(_n: BlockNumberFor<T>) -> Weight;
}Expand description
Extension trait for [OnInitialize].
It takes care to register the weight of each pallet directly after executing its
on_initialize.
The trait is sealed.
Required Methods§
Sourcefn on_initialize_with_weight_registration(_n: BlockNumberFor<T>) -> Weight
fn on_initialize_with_weight_registration(_n: BlockNumberFor<T>) -> Weight
The actual logic that calls on_initialize and registers the weight.
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.