pub trait ConsensusBuilder<Node>: Sendwhere
Node: FullNodeTypes,{
type Consensus: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static;
// Required method
fn build_consensus(
self,
ctx: &BuilderContext<Node>,
) -> impl Future<Output = Result<Self::Consensus, Report>> + Send;
}
Expand description
A type that knows how to build the consensus implementation.
Required Associated Types§
Sourcetype Consensus: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static
type Consensus: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static
The consensus implementation to build.
Required Methods§
Sourcefn build_consensus(
self,
ctx: &BuilderContext<Node>,
) -> impl Future<Output = Result<Self::Consensus, Report>> + Send
fn build_consensus( self, ctx: &BuilderContext<Node>, ) -> impl Future<Output = Result<Self::Consensus, Report>> + Send
Creates the consensus implementation.
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.