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

    // Required methods
    fn asset_metadata_by_id<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AssetMetadataByIdRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<AssetMetadataByIdResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn asset_metadata_by_ids<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AssetMetadataByIdsRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AssetMetadataByIdsStream>, 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 AssetMetadataByIdsStream: Stream<Item = Result<AssetMetadataByIdsResponse, Status>> + Send + 'static

Server streaming response type for the AssetMetadataByIds method.

Required Methods§

source

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

source

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

Requests a stream of asset metadata, given an array of asset IDs. Responses may be streamed in a different order from that of the asset IDs in the request, and asset IDs unknown to the node will not receive any response objects – that is, the number of responses may be smaller than the length of the asset IDs array.

Implementors§