Skip to main content

ParallelizationContract

Trait ParallelizationContract 

Source
pub trait ParallelizationContract<T, C> {
    type Pusher: Push<Message<T, C>> + 'static;
    type Puller: Pull<Message<T, C>> + 'static;

    // Required method
    fn connect(
        self,
        worker: &Worker,
        identifier: usize,
        address: Rc<[usize]>,
        logging: Option<Logger>,
    ) -> (Self::Pusher, Self::Puller);
}
Expand description

A ParallelizationContract allocates paired Push and Pull implementors.

Required Associated Types§

Source

type Pusher: Push<Message<T, C>> + 'static

Type implementing Push produced by this pact.

Source

type Puller: Pull<Message<T, C>> + 'static

Type implementing Pull produced by this pact.

Required Methods§

Source

fn connect( self, worker: &Worker, identifier: usize, address: Rc<[usize]>, logging: Option<Logger>, ) -> (Self::Pusher, Self::Puller)

Allocates a matched pair of push and pull endpoints implementing the pact.

Implementors§

Source§

impl<T, B, C, D> ParallelizationContract<T, C> for DistributorPact<B>
where T: Timestamp, B: FnOnce(usize) -> D, C: Accountable + ContainerBytes + Send + 'static, D: Distributor<C> + 'static,

Source§

type Pusher = Exchange<T, LogPusher<Box<dyn Push<Message<T, C>>>>, D>

Source§

type Puller = LogPuller<Box<dyn Pull<Message<T, C>>>>

Source§

impl<T: 'static, C: Accountable + 'static> ParallelizationContract<T, C> for Pipeline