Skip to main content

Partitioned

Struct 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>,

Source

pub fn new(parts: Vec<P>) -> Self

Create a client partitioned across multiple client shards.

Trait Implementations§

Source§

impl<P: Debug, C: Debug, R: Debug> Debug for Partitioned<P, C, R>
where (C, R): Partitionable<C, R>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<P, C, R> GenericClient<C, R> for Partitioned<P, C, R>
where P: GenericClient<C, R>, (C, R): Partitionable<C, R>, C: Debug + Send, R: Debug + Send,

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,

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

Source§

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

Sends a command to the dataflow server. Read more
Source§

fn as_stream<'a>( &'a mut self, ) -> Pin<Box<dyn Stream<Item = Result<R, Error>> + Send + 'a>>
where R: Send + 'a,

Returns an adapter that treats the client as a stream. Read more

Auto Trait Implementations§

§

impl<P, C, R> !Freeze for Partitioned<P, C, R>

§

impl<P, C, R> !RefUnwindSafe for Partitioned<P, C, R>

§

impl<P, C, R> Send for Partitioned<P, C, R>
where P: Send,

§

impl<P, C, R> !Sync for Partitioned<P, C, R>

§

impl<P, C, R> !Unpin for Partitioned<P, C, R>

§

impl<P, C, R> !UnwindSafe for Partitioned<P, C, R>