pub trait PartitionedState<C, R>: Debug + Send {
    fn split_command(&mut self, command: C) -> Vec<Option<C>> ;
    fn absorb_response(
        &mut self,
        shard_id: usize,
        response: R
    ) -> Option<Result<R, Error>>; }
Expand description

A state machine for a partitioned client that partitions commands across and amalgamates responses from multiple partitions.

Required Methods§

Splits a command into multiple partitions.

Absorbs a response from a single partition.

If responses from all partitions have been absorbed, returns an amalgamated response.

Implementors§