[][src]Module types::slot_epoch

The Slot and Epoch types are defined as new types over u64 to enforce type-safety between the two types.

Slot and Epoch have implementations which permit conversion, comparison and math operations between each and u64, however specifically not between each other.

All math operations on Slot and Epoch are saturating, they never wrap.

It would be easy to define PartialOrd and other traits generically across all types which implement Into<u64>, however this would allow operations between Slots and Epochs which may lead to programming errors which are not detected by the compiler.

Structs

Epoch
Slot
SlotIter