pub trait ConsensusTime: PartialOrd + Ord + Send + Sync + Debug + Clone + Copy + Hash + Deref<Target = u64> + Serialize + for<'de> Deserialize<'de> + AddAssign<u64> + Add<u64, Output = Self> + Sub<u64, Output = Self> + 'static + Committable {
    // Required methods
    fn new(val: u64) -> Self;
    fn u64(&self) -> u64;

    // Provided method
    fn genesis() -> Self { ... }
}
Expand description

Trait for time compatibility needed for reward collection

Required Methods§

source

fn new(val: u64) -> Self

Create a new instance of this time unit

source

fn u64(&self) -> u64

Get the u64 format of time

Provided Methods§

source

fn genesis() -> Self

Create a new instance of this time unit at time number 0

Object Safety§

This trait is not object safe.

Implementors§