[][src]Enum moodyblues_sdk::event::Keyframe

pub enum Keyframe {
    NewBlock {
        block_height: u64,
    },
    NewRound {
        round_id: u64,
        block_height: u64,
    },
    NewStep {
        step_name: String,
        round_id: u64,
        block_height: u64,
    },
}

A keyframe is a start point of a phase, the Tendermint-like algorithm always through a series of steps to reach a consensus like this

+-----------------------------------------------+
|                 block 1                       |
+--+---------------------------------------+----+
   |              round 1                  |
   +-+-----------+------------+----------+-+
     |   step 1  |   step 2   |  step .. |
     +-----------+------------+----------+

Variants

NewBlock

mark the event as starts of block

Fields of NewBlock

block_height: u64
NewRound

mark the event as starts of round

Fields of NewRound

round_id: u64block_height: u64
NewStep

mark the event as starts of step

Fields of NewStep

step_name: Stringround_id: u64block_height: u64

Trait Implementations

impl Debug for Keyframe[src]

impl<'de> Deserialize<'de> for Keyframe[src]

impl Serialize for Keyframe[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.