cnidarium::rpc::proto::v1::query_service_server

Trait QueryService

Source
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 non_verifiable_key_value<'life0, 'async_trait>(
        &'life0 self,
        request: Request<NonVerifiableKeyValueRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<NonVerifiableKeyValueResponse>, 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 non_verifiable_key_value<'life0, 'async_trait>( &'life0 self, request: Request<NonVerifiableKeyValueRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<NonVerifiableKeyValueResponse>, 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 non-verifiable 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§