ckb_jsonrpc_types

Trait AsEpochNumberWithFraction

Source
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§

Source

fn epoch_number(&self) -> u64

Return the epoch number of current block

Source

fn epoch_index(&self) -> u64

Return the index in epoch of current block

Source

fn epoch_length(&self) -> u64

Return the epoch length of current block

Implementors§