pub trait AsEpochNumberWithFraction {
// Required methods
fn epoch_number(&self) -> u64;
fn epoch_index(&self) -> u64;
fn epoch_length(&self) -> u64;
}
Expand description
This trait is a restriction for type Uint64
, so we can only get epoch_number, epoch_index
and epoch_length from the type EpochNumberWithFraction
instead of all Uint64
Required Methods§
Sourcefn epoch_number(&self) -> u64
fn epoch_number(&self) -> u64
Return the epoch number of current block
Sourcefn epoch_index(&self) -> u64
fn epoch_index(&self) -> u64
Return the index in epoch of current block
Sourcefn epoch_length(&self) -> u64
fn epoch_length(&self) -> u64
Return the epoch length of current block