pub trait Plan: Sized + Clone + Sync + Send + 'static {
    type Result: Send;

    // Required method
    fn execute<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Result>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A plan for how to execute a request. A user builds up a plan with various options, then exectutes it.

Required Associated Types§

source

type Result: Send

The ultimate result of executing the plan (should be a high-level type, not a GRPC response).

Required Methods§

source

fn execute<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::Result>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Execute the plan.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<In: Clone + Send + Sync + 'static, P: Plan<Result = Vec<Result<In>>>, M: Merge<In>> Plan for MergeResponse<P, In, M>

§

type Result = <M as Merge<In>>::Out

source§

impl<P> Plan for PreserveShard<P>where P: Plan + Shardable,

source§

impl<P: Plan + Shardable + NextBatch, PdC: PdClient> Plan for CleanupLocks<P, PdC>where P::Result: HasLocks + HasNextBatch + HasKeyErrors + HasRegionError,

source§

impl<P: Plan + Shardable, PdC: PdClient> Plan for RetryableMultiRegion<P, PdC>where P::Result: HasKeyErrors + HasRegionError,

§

type Result = Vec<Result<<P as Plan>::Result, Error>>

source§

impl<P: Plan + StoreRequest, PdC: PdClient> Plan for RetryableAllStores<P, PdC>where P::Result: HasKeyErrors + HasRegionError,

§

type Result = Vec<Result<<P as Plan>::Result, Error>>

source§

impl<P: Plan> Plan for ExtractError<P>where P::Result: HasKeyErrors + HasRegionErrors,

§

type Result = <P as Plan>::Result

source§

impl<P: Plan, PdC: PdClient> Plan for ResolveLock<P, PdC>where P::Result: HasLocks,

§

type Result = <P as Plan>::Result

source§

impl<P: Plan, Pr: Process<P::Result>> Plan for ProcessResponse<P, Pr>

§

type Result = <Pr as Process<<P as Plan>::Result>>::Out

source§

impl<Req: KvRequest> Plan for Dispatch<Req>

§

type Result = <Req as KvRequest>::Response