Skip to main content

QueryExecutor

Trait QueryExecutor 

Source
pub trait QueryExecutor {
    // Required method
    fn execute(
        &self,
        query: &Query,
        ctx: &Context,
    ) -> impl Future<Output = Result<Response, Error>>;
}
Expand description

Orchestrator around Resolver: applies caching, batching, deadline propagation, and cancellation checks. Declared here so transport adapters can depend on the trait without a hard dep on themql-query; implemented in themql-query.

Required Methods§

Source

fn execute( &self, query: &Query, ctx: &Context, ) -> impl Future<Output = Result<Response, Error>>

Execute a query with cross-cutting concerns applied.

§Errors

Returns Error if the query cannot be executed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§