pub struct Partitioned<P, C, R>
where (C, R): Partitionable<C, R>,
{ pub parts: Vec<P>, /* private fields */ }
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.

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

Receives the next response from 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> !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>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more