Trait AsConsensus

Source
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§

Source

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

Implementors§

Source§

impl<T, B> AsConsensus<B> for T
where T: Consensus<B>, B: Block,