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