reth_consensus

Trait AsConsensus

Source
pub trait AsConsensus<H, B>: Consensus<H, B> {
    // Required method
    fn as_consensus<'a>(self: Arc<Self>) -> Arc<dyn Consensus<H, B> + 'a>
       where Self: 'a;
}
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<H, B> + 'a>
where Self: 'a,

Converts the Arc of self to Arc of HeaderValidator

Implementors§

Source§

impl<T: Consensus<H, B>, H, B> AsConsensus<H, B> for T