Skip to main content

ResolverBoxed

Trait ResolverBoxed 

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

Blanket adapter: any Resolver whose resolve returns a Send future can be boxed into dyn Resolver.

Required Methods§

Source

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

Resolve a query against this resolver’s resource.

§Errors

Returns Error if the query cannot be fulfilled.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§