pub trait QueryService: Send + Sync + 'static {
    type PrefixValueStream: Stream<Item = Result<PrefixValueResponse, Status>> + Send + 'static;
    type WatchStream: Stream<Item = Result<WatchResponse, Status>> + Send + 'static;

    // Required methods
    fn key_value<'life0, 'async_trait>(
        &'life0 self,
        request: Request<KeyValueRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<KeyValueResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prefix_value<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PrefixValueRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::PrefixValueStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn watch<'life0, 'async_trait>(
        &'life0 self,
        request: Request<WatchRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchStream>, 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 PrefixValueStream: Stream<Item = Result<PrefixValueResponse, Status>> + Send + 'static

Server streaming response type for the PrefixValue method.

source

type WatchStream: Stream<Item = Result<WatchResponse, Status>> + Send + 'static

Server streaming response type for the Watch method.

Required Methods§

source

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

General-purpose key-value state query API, that can be used to query arbitrary keys in the JMT storage.

source

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

General-purpose prefixed key-value state query API, that can be used to query arbitrary prefixes in the JMT storage.

source

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

Subscribes to a stream of key-value updates, with regex filtering on keys.

Implementors§