pub trait Shardable {
    type Shard: Clone + Send + Sync;

    // Required methods
    fn shards(
        &self,
        pd_client: &Arc<impl PdClient>
    ) -> BoxStream<'static, Result<(Self::Shard, RegionStore)>>;
    fn apply_shard(
        &mut self,
        shard: Self::Shard,
        store: &RegionStore
    ) -> Result<()>;
}

Required Associated Types§

Required Methods§

source

fn shards( &self, pd_client: &Arc<impl PdClient> ) -> BoxStream<'static, Result<(Self::Shard, RegionStore)>>

source

fn apply_shard(&mut self, shard: Self::Shard, store: &RegionStore) -> Result<()>

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Shard = <P as Shardable>::Shard

source§

impl<P: Plan + Shardable, PdC: PdClient> Shardable for CleanupLocks<P, PdC>

§

type Shard = <P as Shardable>::Shard

source§

impl<P: Plan + Shardable, PdC: PdClient> Shardable for ResolveLock<P, PdC>

§

type Shard = <P as Shardable>::Shard

source§

impl<Req: KvRequest + Shardable> Shardable for Dispatch<Req>

§

type Shard = <Req as Shardable>::Shard