Trait ExecuteQuery

Source
pub trait ExecuteQuery<Request> {
    type Response;

    // Required methods
    fn query(
        &self,
        request: Request,
    ) -> impl Future<Output = Self::Response> + Send;
    fn query_with_retry(
        &self,
        request: Request,
    ) -> impl Future<Output = Self::Response> + Send
       where Request: Clone,
             Self::Response: Send;

    // Provided method
    fn query_with_policy<Policy>(
        &self,
        request: Request,
        policy: Policy,
    ) -> impl Future<Output = Self::Response> + Send
       where Request: Clone + Send,
             Policy: RetryPolicy<Self::Response> + Send,
             Self::Response: Send,
             Self: Sync { ... }
}

Required Associated Types§

Required Methods§

Source

fn query(&self, request: Request) -> impl Future<Output = Self::Response> + Send

Source

fn query_with_retry( &self, request: Request, ) -> impl Future<Output = Self::Response> + Send
where Request: Clone, Self::Response: Send,

Provided Methods§

Source

fn query_with_policy<Policy>( &self, request: Request, policy: Policy, ) -> impl Future<Output = Self::Response> + Send
where Request: Clone + Send, Policy: RetryPolicy<Self::Response> + Send, Self::Response: Send, Self: Sync,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§