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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§