tikv_client::request::plan

Trait Plan

Source
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.

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§

Source§

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

Source§

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,

Source§

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

Source§

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

Source§

type Result = <P as Plan>::Result

Source§

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

Source§

type Result = <P as Plan>::Result

Source§

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

Source§

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

Source§

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