pub trait QueryService: Send + Sync + 'static {
    type CompactBlockRangeStream: Stream<Item = Result<CompactBlockRangeResponse, Status>> + Send + 'static;

    // Required methods
    fn compact_block_range<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CompactBlockRangeRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::CompactBlockRangeStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn compact_block<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CompactBlockRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlockResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature rpc only.
Expand description

Generated trait containing gRPC methods that should be implemented for use with QueryServiceServer.

Required Associated Types§

source

type CompactBlockRangeStream: Stream<Item = Result<CompactBlockRangeResponse, Status>> + Send + 'static

Server streaming response type for the CompactBlockRange method.

Required Methods§

source

fn compact_block_range<'life0, 'async_trait>( &'life0 self, request: Request<CompactBlockRangeRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::CompactBlockRangeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a stream of compact blocks, optionally keeping the stream alive for push notifications.

source

fn compact_block<'life0, 'async_trait>( &'life0 self, request: Request<CompactBlockRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlockResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a single compact block at a specific height.

Clients requesting multiple compact blocks should generally use the streaming RPC.

Implementors§