Struct mz_service::client::Partitioned
source · pub struct Partitioned<P, C, R>where
(C, R): Partitionable<C, R>,{
pub parts: Vec<P>,
state: <(C, R) as Partitionable<C, R>>::PartitionedState,
}
Expand description
A client whose implementation is partitioned across a number of other clients.
Such a client needs to broadcast (partitioned) commands to all of its clients, and await responses from each of the client partitions before it can respond.
Fields§
§parts: Vec<P>
The individual partitions representing per-worker clients.
state: <(C, R) as Partitionable<C, R>>::PartitionedState
The partitioned state.
Implementations§
source§impl<P, C, R> Partitioned<P, C, R>where
(C, R): Partitionable<C, R>,
impl<P, C, R> Partitioned<P, C, R>where
(C, R): Partitionable<C, R>,
Trait Implementations§
source§impl<P: Debug, C: Debug, R: Debug> Debug for Partitioned<P, C, R>where
(C, R): Partitionable<C, R>,
impl<P: Debug, C: Debug, R: Debug> Debug for Partitioned<P, C, R>where
(C, R): Partitionable<C, R>,
source§impl<P, C, R> GenericClient<C, R> for Partitioned<P, C, R>
impl<P, C, R> GenericClient<C, R> for Partitioned<P, C, R>
source§fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<R>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<R>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
§Cancel safety
This method is cancel safe. If recv
is used as the event in a tokio::select!
statement and some other branch completes first, it is guaranteed that no messages were
received by this client.