Trait zebra_state::service::block_iter::ChainItem

source ·
pub(crate) trait ChainItem {
    type Type;

    // Required method
    fn read(
        chain: Option<&Arc<Chain>>,
        db: &ZebraDb,
        height: Height,
    ) -> Option<Self::Type>;
}
Expand description

A trait that implements iteration for a specific chain type.

Required Associated Types§

Required Methods§

source

fn read( chain: Option<&Arc<Chain>>, db: &ZebraDb, height: Height, ) -> Option<Self::Type>

Read the Type at height from the non-finalized chain or finalized db.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ChainItem for Header

source§

type Type = Arc<Header>

source§

fn read( chain: Option<&Arc<Chain>>, db: &ZebraDb, height: Height, ) -> Option<Self::Type>

source§

impl ChainItem for Block

source§

type Type = Arc<Block>

source§

fn read( chain: Option<&Arc<Chain>>, db: &ZebraDb, height: Height, ) -> Option<Self::Type>

Implementors§