ConsensusBuilder

Trait ConsensusBuilder 

Source
pub trait ConsensusBuilder<State>: Send {
    type Consensus: Component;

    // Required method
    fn build_consensus(
        self,
        ctx: &BuilderContext<State>,
    ) -> impl Future<Output = Result<Self::Consensus>> + Send;
}
Expand description

Builder for consensus components (for blockchain compatibility)

Required Associated Types§

Source

type Consensus: Component

The consensus component type

Required Methods§

Source

fn build_consensus( self, ctx: &BuilderContext<State>, ) -> impl Future<Output = Result<Self::Consensus>> + Send

Build the consensus component

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§