pub trait AsConsensus<B>: Consensus<B>where
B: Block,{
// Required method
fn as_consensus<'a>(
self: Arc<Self>,
) -> Arc<dyn Consensus<B, Error = Self::Error> + 'a>
where Self: 'a;
}
Available on crate feature
consensus
only.Expand description
Helper trait to cast Arc<dyn FullConsensus>
to Arc<dyn Consensus>
Required Methods§
Sourcefn as_consensus<'a>(
self: Arc<Self>,
) -> Arc<dyn Consensus<B, Error = Self::Error> + 'a>where
Self: 'a,
fn as_consensus<'a>(
self: Arc<Self>,
) -> Arc<dyn Consensus<B, Error = Self::Error> + 'a>where
Self: 'a,
Converts the Arc
of self to Arc
of HeaderValidator