zebra_rpc::sync

Trait SyncerRpcMethods

source
trait SyncerRpcMethods {
    // Required methods
    async fn get_best_block_height_and_hash(&self) -> Option<(Height, Hash)>;
    async fn get_block(
        &self,
        height: u32,
    ) -> Result<Option<Arc<Block>>, BoxError>;

    // Provided method
    fn block_range_ordered(
        &self,
        height_range: RangeInclusive<Height>,
    ) -> FuturesOrdered<impl Future<Output = Result<Option<Arc<Block>>, BoxError>>> { ... }
}

Required Methods§

source

async fn get_best_block_height_and_hash(&self) -> Option<(Height, Hash)>

source

async fn get_block(&self, height: u32) -> Result<Option<Arc<Block>>, BoxError>

Provided Methods§

source

fn block_range_ordered( &self, height_range: RangeInclusive<Height>, ) -> FuturesOrdered<impl Future<Output = Result<Option<Arc<Block>>, BoxError>>>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SyncerRpcMethods for RpcRequestClient

source§

async fn get_best_block_height_and_hash(&self) -> Option<(Height, Hash)>

source§

async fn get_block(&self, height: u32) -> Result<Option<Arc<Block>>, BoxError>

Implementors§