pub trait OnPoll<BlockNumber> {
// Provided method
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter) { ... }
}
Expand description
Periodically executes logic. Is not guaranteed to run within a specific timeframe and should only be used on logic that has no deadline.
Provided Methodsยง
Sourcefn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
Code to execute every now and then at the beginning of the block after inherent application.
The remaining weight limit must be respected.
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.