pub trait BlockSlot<T: Config> {
// Required methods
fn future_slot(block_number: BlockNumberFor<T>) -> Option<Slot>;
fn slot_produced_after(to_check: Slot) -> Option<BlockNumberFor<T>>;
fn current_slot() -> Slot;
}Required Methods§
Sourcefn future_slot(block_number: BlockNumberFor<T>) -> Option<Slot>
fn future_slot(block_number: BlockNumberFor<T>) -> Option<Slot>
Returns the highest valid slot for the given block_number.
Returns None if that block number is too far in the past, or too far in the future.
Sourcefn slot_produced_after(to_check: Slot) -> Option<BlockNumberFor<T>>
fn slot_produced_after(to_check: Slot) -> Option<BlockNumberFor<T>>
Returns the latest block number whose slot is less than the given to_check slot
Sourcefn current_slot() -> Slot
fn current_slot() -> Slot
Returns the slot at the current block height
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.