pub trait QueryService:
Send
+ Sync
+ 'static {
// Required method
fn query<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<QueryResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with QueryServiceServer.
Required Methods§
Sourcefn query<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<QueryResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<QueryResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Asks a query and returns the answer of one read model that answers its type and has
processed min_position (several are taken in turn). Needs query for the qualified query
type. Middlewares before the query may reject it, middlewares after it may reject the
response; the outcome is then rejected. Errors: UNAUTHENTICATED (invalid signature,
outside the time window), PERMISSION_DENIED, INVALID_ARGUMENT, UNAVAILABLE (no connected
read model answers the type, or a middleware is not connected), DEADLINE_EXCEEDED (no
read model answered, or reached min_position, within the kernel’s query timeout, or a
middleware did not answer in time), FAILED_PRECONDITION (see listener).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".